You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/lib/agent/prompts.ts
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,9 @@ You operate in a local Node.js runtime on the user's machine.
97
97
- NEVER use \`npm install <package>\` to add new dependencies — this does NOT update package.json
98
98
- Instead, ALWAYS update package.json via devonz_write_file to add packages to dependencies/devDependencies
99
99
- Then run a single \`npm install\` command to install everything
100
+
- NEVER write \`"latest"\` in package.json — use the version already present in the template, a vetted compatible semver range, or skip the package if you're unsure
101
+
- NEVER invent package names or use outdated/renamed packages; if a package name is uncertain, prefer an existing dependency or a built-in browser/React/Tailwind solution
102
+
- When fixing a missing-package error, first verify whether the import should change before adding a new dependency
100
103
- WRONG: \`npm install react-router-dom zustand\` (packages won't be in package.json)
101
104
- RIGHT: Write updated package.json with new packages, then run \`npm install\`
- NEVER use "npm install <package>" shell commands to add new dependencies
135
135
- Instead, ALWAYS update package.json via a devonzAction type="file" to add packages to "dependencies" or "devDependencies"
136
136
- Then run a single "npm install" shell action to install everything at once
137
+
- NEVER write \`"latest"\` in package.json — use the version already present in the template, a vetted compatible semver range, or skip the package if you're unsure
138
+
- NEVER invent package names or use outdated/renamed packages; if a package name is uncertain, prefer an existing dependency or a built-in browser/React/Tailwind solution
139
+
- When fixing a missing-package error, first verify whether the import should be changed before adding a new dependency
137
140
- Why: Shell-only npm install does NOT persist dependencies in package.json, causing cascading failures when the dev server restarts
138
141
- Correct workflow for adding new packages:
139
142
1. Write updated package.json with new packages added to dependencies/devDependencies
`Skipped auto-install for ${unverified.length} unverified package(s): ${unverified.join(', ')}. Leaving the import error visible so Devonz can correct the package name instead of installing a hallucinated dependency.`,
1154
+
);
1155
+
}
1156
+
1157
+
if(installable.length===0){
1158
+
return;
1159
+
}
1134
1160
1135
-
// Inject missing packages into package.json dependencies
0 commit comments