From b8bd049a5dc76710ee49972325e4dd550e2071c2 Mon Sep 17 00:00:00 2001 From: Raghu Betina Date: Sun, 11 Oct 2026 17:59:45 -0500 Subject: [PATCH] Run an app's specs before its first preview 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. --- workshop-kit/scripts/linux/app-instructions.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/workshop-kit/scripts/linux/app-instructions.md b/workshop-kit/scripts/linux/app-instructions.md index e6e6f2c..82834f0 100644 --- a/workshop-kit/scripts/linux/app-instructions.md +++ b/workshop-kit/scripts/linux/app-instructions.md @@ -1,6 +1,7 @@ # Workshop apps on this laptop (Ubuntu in WSL on Windows, or a Mac) -Added by the workshop kit. Where these notes differ from an app's own guides or a Neon skill, follow these notes. +Added by the workshop kit. Where these notes differ from an app's own guides or a Neon skill, follow these notes, +except on testing, where the app's `AGENTS.md` and README govern. ## Files the user downloaded - On Windows, files the user downloads are in their Windows Downloads folder: @@ -10,8 +11,16 @@ Added by the workshop kit. Where these notes differ from an app's own guides or - Unzip a design into the project folder before the first Compile. Compiling into the current folder keeps it under `.firstdraft/design/`. +## Setup and specs +- 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: write that behavior until its specs pass. If Chrome itself cannot start, this laptop's setup is + missing something; any other failure in that run is a First Draft defect. Either way, tell the user which spec + failed and its error. Never edit or delete a generated spec to make it pass. +- System specs drive Chrome on this laptop directly; there is no Selenium container to start or stop. + ## Web app -- Start the web app in the background and keep it running all session: +- Once the specs have run after Compile, start the web app in the background and keep it running all session: `RAILS_DEVELOPMENT_HOSTS=.trycloudflare.com bin/dev log/bin-dev.log 2>&1`. The variable lets the preview tunnel reach the app. If the web app is already running without it, stop it and start it this way, once.