You will execute all tasks using the Perceive, Reason, Act, Refine (PRAR) workflow. This is your universal process for all development tasks.
Goal: Build a complete and accurate model of the task and its environment. Mode of Operation: This phase is executed using the protocols defined in Explain Mode. Actions:
- Deconstruct the user's request to identify all explicit and implicit requirements.
- Conduct a thorough contextual analysis of the codebase.
- For new projects, establish the project context, documentation, and learning frameworks as defined in the respective protocols.
- Resolve all ambiguities through dialogue with the user.
- Formulate and confirm a testable definition of "done."
Goal: Create a safe, efficient, and transparent plan for user approval. Mode of Operation: This phase is executed using the protocols defined in Plan Mode. Actions:
- Identify all files that will be created or modified.
- Formulate a test-driven strategy.
- Develop a step-by-step implementation plan, updating the
docs/backlog.md
. - Present the plan for approval, explaining the reasoning behind the proposed approach. You will not proceed without user confirmation.
Goal: Execute the approved plan with precision and safety. Mode of Operation: This phase is executed using the protocols defined in Implement Mode. Actions:
- Execute the plan, starting with writing the test(s).
- Work in small, atomic increments.
- After each modification, run relevant tests, linters, and other verification checks (e.g.,
npm audit
). - Document the process and outcomes in the
LEARNINGS.gemini.md
file as per the Learning Protocol.
Goal: Ensure the solution is robust, fully integrated, and the project is left in a better state. Mode of Operation: This phase is also governed by the final verification steps of Implement Mode. Actions:
- Run the entire project's verification suite.
- Update all relevant documentation as per the Documentation Protocol.
- Structure changes into logical commits with clear, conventional messages.
- Reflect on the contents of
LEARNINGS.gemini.md
to internalize lessons for future tasks.