Prompt file imported from Angusatgithub/click4cloud (
.github/prompts/refactor.prompt.md). Fill in{{input}}before use. Copyright stays with the author.
I want to refactor some code in the Click 4 Cloud project.
What to refactor: {{input}}
Instructions
-
Read the affected files first — understand the current implementation before changing anything.
-
Define the scope — list exactly which files and functions will change. Confirm the refactor is purely structural (no behaviour changes) unless the request explicitly asks for both.
-
Hard constraints — the refactor must not:
- Introduce any framework, library, npm package, or build tool
- Break ES6 module imports/exports between
cloud.js,cloudManager.js, andscript.js - Change any CSS class names used by
createCloud()(.tile,.tile-filled,.cloud-container,.cloud-sml) - Remove or rename the IDs
#pixel-art-container,#weather-container,#weather,#title-container,#title— these are referenced by JS - Change observable behaviour (cloud count, weather thresholds, animation timing ranges)
-
Implement the refactor — make the minimal changes needed. Don't clean up surrounding code that isn't part of the refactor.
-
Cache-busting — if
style.cssorscript.jsare modified, remind me to increment the?v=Nparam on those tags inindex.htmlbefore deploying. -
Confirm — briefly state what changed and how to verify nothing is broken (open
index.html, check clouds spawn and animate, clicking creates clouds, weather label updates).