From 3ed740bae7443a0961f8c32893da4b055ab3213a Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 3 Mar 2026 11:42:39 +0100 Subject: [PATCH 01/35] T1: Copilot Instructions + Cursor Rules (9 files) --- .cursor/rules/builder-bug-workflow.mdc | 130 +++++++++++++ .cursor/rules/manager-bug-workflow.mdc | 74 ++++++++ .cursor/rules/renderer-bug-workflow.mdc | 77 ++++++++ .cursor/rules/verification-checklist.mdc | 25 +++ .github/copilot-instructions.md | 117 ++++++++++++ package.json | 1 + scripts/capture-terminal-output.ts | 178 ++++++++++++++++++ scripts/package.json | 1 + scripts/terminal-output-snapshots/README.md | 41 ++++ .../builder-vite-build.snap.txt | 18 ++ .../builder-webpack5-build.snap.txt | 17 ++ 11 files changed, 679 insertions(+) create mode 100644 .cursor/rules/builder-bug-workflow.mdc create mode 100644 .cursor/rules/manager-bug-workflow.mdc create mode 100644 .cursor/rules/renderer-bug-workflow.mdc create mode 100644 .cursor/rules/verification-checklist.mdc create mode 100644 scripts/capture-terminal-output.ts create mode 100644 scripts/terminal-output-snapshots/README.md create mode 100644 scripts/terminal-output-snapshots/builder-vite-build.snap.txt create mode 100644 scripts/terminal-output-snapshots/builder-webpack5-build.snap.txt diff --git a/.cursor/rules/builder-bug-workflow.mdc b/.cursor/rules/builder-bug-workflow.mdc new file mode 100644 index 000000000000..b93ec010c2c4 --- /dev/null +++ b/.cursor/rules/builder-bug-workflow.mdc @@ -0,0 +1,130 @@ +--- +description: Verification workflow for builder bug fixes (frontend output and Node.js terminal output) +globs: "code/builders/**" +alwaysApply: false +--- + +# Builder Bug Verification Workflow + +When fixing bugs in `code/builders/**`, determine whether the change affects browser-visible output (Flow 2) or Node.js stdout/stderr output (Flow 3), and follow the appropriate workflow. + +## Decision: Is this a Browser Output Bug or Terminal Output Bug? + +- **Browser output bug** (Flow 2): The fix affects how Storybook renders in the browser (CSS, layout, UI elements, story preview content). +- **Terminal output bug** (Flow 3): The fix affects what is logged to the console during the build or dev process (progress messages, timestamps, paths, diagnostics). + +--- + +## Flow 2 — Builder Bug Verification (Frontend Output) + +Follow this workflow if your builder change affects browser-visible output. + +### Step 1: Create or Update a Template Story + +Create or update a story in the sandbox that demonstrates the affected behaviour and confirms the fix. + +### Step 2: Select the Appropriate Sandbox Template + +- **`builder-vite` changes**: Use `react-vite/default-ts` +- **`builder-webpack5` changes**: Use `react-webpack/18-ts` + +### Step 3: Generate and Start the Sandbox + +Generate the sandbox environment: + +```bash +yarn nx sandbox