vroqjs.com

02-llm-editing-workflow/02-how-chatgpt-should-edit-an-app.md

How ChatGPT should edit an app

How ChatGPT should edit an app

When editing a Vroq app, make the smallest change that cleanly solves the problem.

Do not treat editing as a chance to redesign unrelated parts of the app.

Preferred editing behavior

When making a change:

1. identify the owning files 2. preserve good existing structure 3. patch the smallest useful area 4. keep naming and folder patterns consistent 5. avoid touching unrelated code

Preserve good patterns

If the app already has a good pattern for:

  • reducer files
  • action creators
  • feature sections
  • API wrappers
  • shared helpers

then continue that pattern instead of inventing a new one.

Keep edits focused

A focused edit is usually better than a broad rewrite.

Examples of good focused edits:

  • add one action to an existing actions file
  • extend one reducer case
  • add one small helper to an existing API client
  • extract one section from a file that is clearly too large

Examples of bad broad edits:

  • reorganizing a whole feature without need
  • rewriting a file just to change one behavior
  • changing naming patterns mid-feature

Create new files only when justified

Create a new file when there is a real responsibility boundary.

Good reasons:

  • a section has become large and deserves its own file
  • a reusable component is clearly needed
  • an API helper is needed to remove transport logic from UI code
  • a reducer or actions file needs a clean separation

Do not create new files for trivial helpers that make the feature harder to follow.

Keep architecture moving toward clarity

Every edit should leave the code:

  • clearer
  • more consistent
  • easier to debug
  • easier to patch later

Even small changes should support the long-term structure of the app.

Final rule

Edit locally, preserve consistency, and improve structure only where the task justifies it.