Problem
scaffold() in packages/cli/src/commands/scaffold.ts checks if (opts.install) to run postInstall hooks — but never actually executes pnpm install.
The postInstall hooks are designed to run after packages are installed (verification, setup steps that require the packages to be present). But since install never runs, postInstall hooks never get a chance to do meaningful work.
Additionally, the --install flag name implies that passing it installs packages. It doesn't.
Impact
postInstall hooks are dead code in practice (nobody passes --install expecting hooks, not install)
- Pro packages that verify installation in
postInstall never actually verify anything
- Workaround required:
launch-stackwright-pro manually runs pnpm install via execSync after scaffold() returns, then manually fires postInstall hooks. This is unnecessary complexity.
Fix
When opts.install = true, exec pnpm install in targetDir before firing postInstall hooks:
if (opts.install) {
execSync('pnpm install', { cwd: targetDir, stdio: 'inherit' });
await runScaffoldHooks('postInstall', { ... });
}
UX Consideration
Per PHILOSOPHY.md: 'Day 0: A non-developer chats with a branding agent... The output is a complete, deployed site — all within a single conversation.'
launch-stackwright currently tells users to run pnpm install manually. Consider making --install default to true for the launch-stackwright launcher (not the raw stackwright scaffold command, which has different audiences).
Files: packages/cli/src/commands/scaffold.ts
Surfaced during audit of the pro scaffold hook pipeline — see stackwright-agent-coordination for full context.
Problem
scaffold()inpackages/cli/src/commands/scaffold.tschecksif (opts.install)to runpostInstallhooks — but never actually executespnpm install.The
postInstallhooks are designed to run after packages are installed (verification, setup steps that require the packages to be present). But since install never runs,postInstallhooks never get a chance to do meaningful work.Additionally, the
--installflag name implies that passing it installs packages. It doesn't.Impact
postInstallhooks are dead code in practice (nobody passes--installexpecting hooks, not install)postInstallnever actually verify anythinglaunch-stackwright-promanually runspnpm installviaexecSyncafterscaffold()returns, then manually firespostInstallhooks. This is unnecessary complexity.Fix
When
opts.install = true, execpnpm installintargetDirbefore firingpostInstallhooks:UX Consideration
Per PHILOSOPHY.md: 'Day 0: A non-developer chats with a branding agent... The output is a complete, deployed site — all within a single conversation.'
launch-stackwrightcurrently tells users to runpnpm installmanually. Consider making--installdefault totruefor thelaunch-stackwrightlauncher (not the rawstackwright scaffoldcommand, which has different audiences).Files:
packages/cli/src/commands/scaffold.tsSurfaced during audit of the pro scaffold hook pipeline — see stackwright-agent-coordination for full context.