Skip to content

Run an app's specs before its first preview - #26

Merged
raghubetina merged 1 commit into
mainfrom
spec-run-before-preview
Oct 11, 2026
Merged

raghubetina merged 1 commit into
mainfrom
spec-run-before-preview

Conversation

@raghubetina

Copy link
Copy Markdown
Contributor

From the deploy of firstdraft/firstdraft#1103, a generated app's AGENTS.md says to run its specs before other work, and its README says to build the assets and run the specs before the first preview. The app-session notes that handoff writes into CLAUDE.md sent the agent from Compile straight to bin/dev, and they took precedence over the app's own guides.

This mirrors firstdraft/drawing-board#80 in workshop-kit/scripts/linux/app-instructions.md, adjusted to a laptop:

  • The precedence sentence now leaves testing to the app's AGENTS.md and README.
  • A new Setup and specs section: after Compile, set up the app, build its assets and run its specs as its README says, before the first preview. In that first run, a NotImplementedError that names behavior listed under the README's Behavior to write is work to do; any other failure is a First Draft defect to tell the user about. Never edit or delete a generated spec to make it pass. Each sentence also holds before the deploy, when apps have no stubs and their README has no Behavior to write.
  • System specs drive Chrome on the laptop; there is no Selenium container. A Chrome that cannot start is named a gap in the laptop's setup, so it is not reported as a First Draft defect (see below).
  • The web app starts once the specs have run after Compile.

Chrome on WSL. The kit installs no Chrome. Without CAPYBARA_SERVER_HOST, the generated app's system specs use local headless Chrome through Selenium Manager (selenium-webdriver 4.45), which downloads Chrome for Testing when Chrome is missing. That build and its chromedriver need libnss3, libnspr4 and libasound2t64. Canonical's Ubuntu 24.04 WSL image manifest (ubuntu-noble-wsl-amd64-wsl.manifest) has none of the three, and tools.sh does not install them, so system specs on a fresh Windows laptop will likely fail to start Chrome until those libraries are installed. On a Mac, Selenium uses an installed Google Chrome or downloads Chrome for Testing. Installing the libraries is left out of this change.

Not run: a laptop (WSL or Mac), a real Compile, and Claude reading the notes. This repository has no CI.

Not for merging until the owner approves: merging changes what newly set-up laptops get.

From the next First Draft deploy, a generated app's AGENTS.md says to
run its specs before other work, and its README says to build the
assets and run the specs before the first preview. The app-session
notes sent the agent from Compile straight to bin/dev, and they took
precedence over the app's own guides, so they would have skipped
that step.

The notes now set up the app and run its specs first, say what a
failure in that first run means, and let the app's AGENTS.md and
README govern testing, as the Drawing Board's notes now do. A
NotImplementedError that names behavior listed under Behavior to
write is work to do; any other failure is a First Draft defect. Both
hold before the deploy, when apps have no stubs.

On a laptop, system specs drive Chrome directly. The kit installs no
Chrome, so Selenium Manager downloads Chrome for Testing, which needs
libnss3, libnspr4 and libasound2t64 to start. The Ubuntu 24.04 WSL
image lacks them, and the kit does not install them. The notes call
a Chrome that cannot start a gap in the laptop's setup, so that it is
not reported as a First Draft defect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant