Files
next-ai-draw-io/app/api
dayuan.jiang c919a2d0ec fix(prompts): make the layout engine the default path, not display_diagram
"Generate a diagram to illustrate the git operation" still produced
hand-written XML. Root cause: the very first working instruction in the
system prompt said "then use display_diagram tool to generate the XML" —
unconditionally. The tool-routing rules that divide by layout shape only
appear 70 lines later, so the earlier, more actionable instruction won.
That line predates draw_graph and restructure_diagram, from when
display_diagram was the only drawing tool.

- The opening instruction now says to pick the tool by layout shape, and
  names the engine tools as the default with display_diagram as the
  exception.
- The identity line no longer describes the job as "precise XML
  specifications".
- draw_graph's examples (prompt and tool description) now include
  git/branching workflows and the "illustrate how X works" phrasing.
- "Core capabilities" and "Layout constraints" are scoped to
  display_diagram — they read as instructions to hand-position everything.
- The edit_diagram error-recovery note no longer funnels back to
  display_diagram for restructuring.
- display_diagram's own tool description now states it is the exception
  and points to draw_graph / restructure_diagram.
2026-08-09 18:34:50 +09:00
..