[eric] agents: CreateApp is offer-first; track/organize/plan asks answer in chat instead of scaffolding an app

This commit is contained in:
ciregenz
2026-08-10 17:55:10 -07:00
parent bceb407b56
commit 69c34b7439
2 changed files with 14 additions and 7 deletions
+7 -4
View File
@@ -26,10 +26,13 @@ TOOLS = [
"description": (
"Create a new OpenSwarm App: a real React 18 + TypeScript + Vite web app "
"(optional FastAPI backend) that appears as a live preview card on the "
"user's dashboard, next to you. Use this whenever the user asks you to "
"build/make an app, tool, game, dashboard, tracker, visualizer, or any "
"interactive UI. Returns the workspace path to write code in plus the "
"App Builder reference (stack, layout, rules) — follow it. To EDIT an "
"user's dashboard, next to you. HARD RULE: call this only when the user's "
"message explicitly says to build/make/create an app, tool, game, or "
"dashboard. A question, plan, list, comparison, or a wish to track or "
"organize something is NOT an app request: answer it in chat (rich "
"components beat prose), then offer to build an app and wait for a yes. "
"Returns the workspace path to write code in plus "
"the App Builder reference (stack, layout, rules) — follow it. To EDIT an "
"app that already exists, don't call this; edit its workspace files "
"directly (the path is in your context when the user selects the app, "
"and the preview hot-reloads on save)."
@@ -84,9 +84,13 @@ def compose_turn_system_prompt(
# Every other mode gets one line of discovery instead of the whole reference: CreateApp's result carries the reference when actually used, so the base prompt stays cheap.
apps_note = (
"<apps_capability>\n"
"You can build real web apps for the user: when they ask for an app, tool, game, or dashboard, "
"call the CreateApp tool — it seeds a workspace and puts a live preview card on their dashboard, "
"then you write the code. To change an existing app, have the user select its card (or use the "
"You can build real web apps for the user: CreateApp seeds a workspace and puts a live preview "
"card on their dashboard, then you write the code. HARD RULE: call CreateApp only when the user "
"explicitly says to build/make/create an app, tool, game, or dashboard. Wanting to track, "
"organize, plan, or compare something is NOT that ask: answer it in chat with rich components, "
"then ask one short question offering to build an app for it, and only build after a yes. This "
"offer-first rule intentionally overrides the act-don't-ask default, because an unwanted app is "
"expensive to undo. To change an existing app, have the user select its card (or use the "
"workspace path in your context) and edit the files directly.\n"
"</apps_capability>"
)