This document outlines the strategic decisions, technology choices, and initial planning for the Gemini GitLab Workflow (ggw) project.
The primary objective is to create a tool that synchronizes GitLab issues with a local file system, uses a Gemini AI model to analyze the project context and generate new feature plans (Epics, Stories), and then uploads these structured plans back to GitLab.
The task is broken down into the following key components:
- GitLab Synchronization: A script to fetch all relevant data (issues, labels, etc.) from a GitLab project and store it locally in a structured format (e.g., Markdown files).
- Contextual Analysis: A mechanism to build a comprehensive understanding of the project's state, including issue relationships and dependencies.
- AI-Powered Planning: Integration with the Gemini AI model to process a high-level user request, analyze the project context, and generate a detailed, structured implementation plan.
- Local Artifact Generation: Creation of local files (Markdown, YAML) that represent the AI-generated plan.
- Upload to GitLab: A script to take the locally generated plan and create the corresponding issues and relationships in GitLab.
- Technology: A script is the most suitable tool for this task. Python is an excellent choice due to the
python-gitlablibrary, which significantly simplifies communication with the GitLab API. Alternatively, Go could be considered for its performance and binary compilation capabilities, but Python allows for faster prototyping. Go might be an option for a future version of the project; for now, Python is sufficient for internal use. - Local Representation: Issues will be stored as Markdown files. This format is human-readable, easy to parse, and integrates well with version control systems.
- Project Mapping: A central
project_map.yamlfile will be used to store the relationships and dependencies between issues, creating a graph-like representation of the project.
synccommand: Fetches all data from GitLab and creates the local Markdown files and theproject_map.yaml.create featurecommand: Initiates an interactive workflow where the user provides a high-level feature description. The tool then uses the Gemini AI to generate a plan, which is saved locally.uploadcommand: Pushes the locally generated plan to GitLab, creating the new issues and linking them.
- Develop the initial
syncscript. - Implement the
project_map.yamlgeneration. - Create the basic CLI structure using a library like
Typer. - Begin integration with the Gemini AI API.