Create a new Dart or Flutter package, with an opinionated structure.
Creates a new Dart or Flutter package with an opinionated structure and detailed planning.
/plugin marketplace add pleaseai/flutter-plugin/plugin install flutter@pleaseaiWe're going to build a new Dart or Flutter package.
First, prompt the user for a description of what the purpose and details of the package will be.
Once the user has specified the description and purpose of the package, 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:
If the user wants the work done on a new branch, create the branch now. Then create the package directory, if it doesn't already exist.
VERY IMPORTANT: Change directories to the package directory now so that future operations are relative to that directory.
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 specs/DESIGN.md in the package directory. Feel free to use your available tools to research any aspects of the design that need clarification.
The design doc should (at least) include sections for:
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 DESIGN.md document, Develop a DETAILED Markdown-formatted phased implementation plan of checkboxed tasks that need to be performed in order to finish developing the package. Save the implementation plan in specs/IMPLEMENTATION.md in the package directory.
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:
empty flag for the tool.pubspec.yaml and set the version number to 0.1.0.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 IMPLEMENTATION.md document, begin implementing the plan.