Files
vibn-frontend/app/api/chat
Mark Henderson 305516c7e4 feat(chat): rewrite system prompt for voice + proactive instinct
The current prompt reads like a runbook — operationally correct, but
it produces tool-call orchestrators rather than co-founders. Now that
the thinking pill streams reasoning between tool calls, the chat
bubble should be where opinion + judgment + push-back live.

What changed:

1. New "Voice" section right after the role declaration. Tells the
   model to:
   - Stop narrating intent before tool calls (the thinking pill
     already covers this).
   - Pack post-tool summaries with the actual answer + obvious next
     step, not a recap of which tools ran.
   - Have an opinion. Pick Postgres or Mongo, defend in one sentence,
     proceed. Don't bullet pros/cons unless asked.
   - Push back when it matters. Refuse "deploy without backups",
     suggest Pipedream over n8n if it fits better.
   - Surface adjacent risks unprompted (missing env vars, DNS not
     propagated, autosave overdue) — the model is protecting the
     user's work because the user trusts it to.
   - Honest about uncertainty: "I'm not sure but X" beats false
     confidence.
   - Length matches stakes — short for short Qs, paragraph for big
     decisions; never pad, never truncate.
   - Markdown sparingly: backticks always for paths/IDs/URLs;
     headings only when 3+ sections; otherwise prose.

2. Hard rules tightened:
   - "Infer projectId from context, only ask if genuinely ambiguous"
     replaces the rote "ask once, then proceed" — saves a tool round
     and feels less robotic.
   - Added explicit "ship/apps.deploy result is authoritative — don't
     verify with gitea_* or shell_exec" rule. Reinforces the fix from
     a896d07 at the prompt level so even older Gemini instances pick
     it up.
   - Added "don't loop blindly on tool errors" — if shell_exec fails
     twice, surface and ask. Prevents the 12-tool retry chains from
     earlier.
   - Removed redundant "be concise" + "summarize after every tool
     call" — both are now subsumed by the Voice section's richer
     guidance.

Operational middle (Vibn structure, deploy recipes, dev container
workflow, port slot rules, HMR config, troubleshooting) is unchanged.
Those are the guard rails that make Path B work.

Net length: +650 chars on a ~8k-char prompt. Worth it for the voice
shift.

Made-with: Cursor
2026-04-28 15:35:24 -07:00
..