Skip to content

fix: edit existing HTML instead of regenerating from scratch#79

Open
GeneralJerel wants to merge 1 commit intomainfrom
fix/77-edit-html-instead-of-regenerating
Open

fix: edit existing HTML instead of regenerating from scratch#79
GeneralJerel wants to merge 1 commit intomainfrom
fix/77-edit-html-instead-of-regenerating

Conversation

@GeneralJerel
Copy link
Copy Markdown
Collaborator

Summary

  • Adds edit-vs-regenerate decision logic to the agent's system prompt so it modifies previous HTML in place when the user requests changes to an existing visualization
  • Adds a mode parameter ("new" | "edit") to plan_visualization tool as a forcing function for the edit/new decision
  • Adds editing guidance to the master playbook skill for surgical, minimal changes

Closes #77

Test plan

  • Generate a visualization (e.g., "Create a bar chart showing quarterly revenue")
  • Send a follow-up edit (e.g., "Change the colors to blue and add a title") — verify agent calls plan_visualization with mode="edit" and modifies rather than regenerates
  • Send an unrelated request (e.g., "Show me a pie chart of market share") — verify agent generates fresh with mode="new"
  • Confirm no regressions on first-time visualization generation

🤖 Generated with Claude Code

Add edit-vs-regenerate decision logic so the agent modifies previous
HTML in place when the user requests changes, instead of always
regenerating the entire visualization from scratch.

Closes #77

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit existing HTML instead of regenerating from scratch

1 participant