Perform a modification of your Flutter or Dart project.
Guides you through modifying a Flutter/Dart project by creating a detailed design document and implementation plan. Use this for complex changes requiring structured planning, user approval at key stages, and thorough testing.
/plugin marketplace add pleaseai/flutter-plugin/plugin install flutter@pleaseaiWe're going to modify some Dart or Flutter project code.
First, prompt the user for a description of what the purpose and details of the modification will be.
Once the user has specified the description and purpose of the modification, outline the information that you will be collecting before creating the design and implementation plan, and present the list to the user, along with your first question.
Next, collect remaining information from the user, one question at a time.
The information you need to collect includes, but might not be limited to:
First, make sure there are no uncommitted changes on the current branch. If there are, notify the user and ask what they would like to do about them before proceeding.
If the user wants the work done on a new branch, create the branch now.
Develop a DETAILED Markdown-formatted design document that follows all of the guidance you have about Dart and Flutter design patterns, rules, best practices, and core principles. Save the design document in MODIFICATION_DESIGN.md in the top directory of the workspace. Feel free to use your available tools to research any aspects of the modification that are unclear.
The design doc should (at least) include:
Be sure to actually fetch and read the research URLs before writing the design document. Do actual web research on the topics that are important to the design.
You must ask the user to review this design document and they must approve it before you continue on to create the implementation plan. They must review and approve it first because if they ask for any changes, it may affect the implementation plan.
After getting explicit approval from the user for the MODIFICATION_DESIGN.md document, develop a DETAILED Markdown-formatted phased implementation plan of checkboxed tasks that need to be performed in order to finish the modification. Save the implementation plan in MODIFICATION_IMPLEMENTATION.md in the top of the repo.
The implementation plan should include a section for a "Journal" which will be updated after each phase and contain a log of the actions taken, things learned, surprises, and deviations from the plan. It should be in chronological order.
The plan should include instructions similar to: "After completing a task, if you added any TODOs to the code or didn't fully implement anything, make sure to add new tasks so that you can come back and complete them later." to prevent leaving tasks unfinished.
In the first phase of the implementation plan, include:
The implementation plan should specify after each phase that you should:
git diff to verify the changes that have been made, and create a suitable commit message for any changes, following any guidelines you have about commit messages. Be sure to properly escape dollar signs and backticks, and present the change message to the user for approval.In the last phase of the plan, include steps to:
You must ask the user to review this implementation plan and they must approve it before starting implementation. They must review and approve it before you begin because if they ask for any changes, the changes may affect the implementation.
After getting explicit approval from the user for the MODIFICATION_IMPLEMENTATION.md document, begin implementing the plan.