Context
dot mod scaffolds a project as a sibling directory of the user's cwd but doesn't (and can't) change the parent shell's cwd. If the user then opens Claude / RevX / their IDE from the parent directory, every subsequent dot build / dot deploy runs from a directory with no package.json and fails with:
No build strategy detected. Add a "build" script to package.json, or install vite/next/typescript.
That error message points at the wrong fix: it suggests editing the project's package.json, but the project is fine — the user just isn't in it. Reproduced today against paritytech/Rock-Paper-Scissors while triaging a (false) "RPS is missing a build script" hard-blocker. From inside the project, dot build succeeds via the vite framework-hint fallback (npm exec vite build); from the parent dir, it fails with the misleading error.
Suggested improvements
In rough priority order:
1. Disambiguate the error in src/utils/build/detect.ts
detectBuildConfig (around line 228) currently throws the same message whether the cwd has no package.json at all, or has one with neither a build script nor a recognised framework. Split those cases:
- No
package.json in cwd: "No package.json found in <cwd> — are you in your project directory? Try cd <subdir> first, or pass the path: dot deploy <dir>."
package.json present but unrecognised: keep the current message.
This single string change closes the entire "wrong directory" class of confused bug reports.
2. dot mod prints a "Next step" footer
After scaffolding finishes, print:
▶ Next: cd <scaffolded-dir>
then run `dot deploy --playground` (or open Claude/RevX in that directory)
Cheap UX polish; catches the gotcha at the exact moment it would save the user.
3. Positional arg for dot build / dot deploy
dot deploy <dir> and dot build <dir> would let the user (or Claude / RevX / CI) pass the project path explicitly, sidestepping the cwd issue entirely. Useful in agent contexts where the agent's cwd is often one level above the project.
Repro
cd ~ # one level above project
dot mod rock-paper-scissors # scaffolds ~/rock-paper-scissors08-XXXXX/
# (shell cwd is still ~)
dot build # → "No build strategy detected"
cd rock-paper-scissors08-XXXXX
dot build # → succeeds via npm exec vite build
Workaround in the meantime
Document in the user-facing flow: after dot mod <name>, cd into the new project directory before opening Claude / RevX / any other tooling. Or launch Claude pointed at the project directly (claude /path/to/project).
Context
dot modscaffolds a project as a sibling directory of the user's cwd but doesn't (and can't) change the parent shell's cwd. If the user then opens Claude / RevX / their IDE from the parent directory, every subsequentdot build/dot deployruns from a directory with nopackage.jsonand fails with:That error message points at the wrong fix: it suggests editing the project's
package.json, but the project is fine — the user just isn't in it. Reproduced today againstparitytech/Rock-Paper-Scissorswhile triaging a (false) "RPS is missing a build script" hard-blocker. From inside the project,dot buildsucceeds via the vite framework-hint fallback (npm exec vite build); from the parent dir, it fails with the misleading error.Suggested improvements
In rough priority order:
1. Disambiguate the error in
src/utils/build/detect.tsdetectBuildConfig(around line 228) currently throws the same message whether the cwd has nopackage.jsonat all, or has one with neither abuildscript nor a recognised framework. Split those cases:package.jsonin cwd: "Nopackage.jsonfound in<cwd>— are you in your project directory? Trycd <subdir>first, or pass the path:dot deploy <dir>."package.jsonpresent but unrecognised: keep the current message.This single string change closes the entire "wrong directory" class of confused bug reports.
2.
dot modprints a "Next step" footerAfter scaffolding finishes, print:
Cheap UX polish; catches the gotcha at the exact moment it would save the user.
3. Positional arg for
dot build/dot deploydot deploy <dir>anddot build <dir>would let the user (or Claude / RevX / CI) pass the project path explicitly, sidestepping the cwd issue entirely. Useful in agent contexts where the agent's cwd is often one level above the project.Repro
Workaround in the meantime
Document in the user-facing flow: after
dot mod <name>,cdinto the new project directory before opening Claude / RevX / any other tooling. Or launch Claude pointed at the project directly (claude /path/to/project).