gemini-phased-workflow
v1.1.4
Published
`gpfw` is a globally-installable NPM command-line tool designed to standardize and streamline a 4-phase coding workflow (Research, Plan, Implement, Validate) using the Gemini CLI. It helps developers manage their thought process and code generation in a s
Readme
gemini-phased-workflow (gpfw)
gpfw is a globally-installable NPM command-line tool designed to standardize and streamline a 4-phase coding workflow (Research, Plan, Implement, Validate) using the Gemini CLI. It helps developers manage their thought process and code generation in a structured manner.
Features
- Research: Conduct research on a given goal using Gemini and save the output.
- Plan: Generate a detailed plan based on the latest research.
- Refine: Refine an existing plan, with options for interactive or automated refinement.
- Implement: Generate code based on a plan and a specific phase request.
- Validate: Review generated code against a plan and provide a validation report.
Installation
Before installing gpfw, ensure you have the Gemini CLI installed and set up. You can find instructions and the repository at https://github.com/google-gemini/gemini-cli.
To install gpfw globally, run:
npm install -g gemini-phased-workflowUsage
The gpfw tool guides you through a four-phase workflow. All generated files are stored in a thoughts/ directory within your project.
1. Research
Start by researching your project goal. This will generate a research document in thoughts/research/.
gpfw research "Your project goal, e.g., How to implement a dark mode toggle in a Gatsby React application using Material-UI?"2. Plan
Generate a detailed plan based on your latest research. This will create a plan-vX.md file in thoughts/plans/.
By default, gpfw plan will use the latest research file from thoughts/research/.
gpfw plan "A high-level description of the plan, e.g., Create a dark mode toggle"You can also specify which research files to use with the --research (or -r) flag.
gpfw plan "A high-level description of the plan" -r thoughts/research/file1.md thoughts/research/file2.md3. Refine
Refine an existing plan. By default, the refined plan will be saved automatically.
gpfw refine thoughts/plans/plan-v1.mdYou can also refine a plan interactively. This will launch an interactive Gemini session. You will need to manually save the refined plan after the session.
gpfw refine --interactive thoughts/plans/plan-v1.md4. Implement
Generate code for a specific phase of your plan. The tool will modify files in the project directly.
gpfw implement <path-to-plan-file> "Description of the phase to implement"
# Example:
gpfw implement thoughts/plans/plan-v1.md "Implement the DarkModeToggle component"5. Validate
Review the generated code against your plan. The validation report will be printed to the console.
gpfw validate <path-to-plan-file> <path-to-code-directory>
# Example:
gpfw validate thoughts/plans/plan-v1.md src/components/Model Configuration
The gpfw tool automatically retries with the gemini-pro-flash model if the gemini-pro model is exhausted or encounters rate limits. This ensures a smoother workflow and continued operation even under heavy usage.
Development
Local Installation for Development
To link your local gpfw development version globally:
cd /path/to/gemini-phased-workflow
npm linkUpdating Prompts
The prompts used by gpfw are located in the templates/ directory. You can modify these files to customize the behavior of the tool.
Contributing
(Add contributing guidelines here)
License
ISC
Inspiration
This project was inspired by the article "Claude Code" by Ashley H.
