gemini-cli-supergemini 0.0.1
A SuperGemini extension for Gemini CLI
Requires Python: >=3.8

# SuperGemini – A Development Framework for Gemini CLI

**A configuration framework that enhances Gemini CLI with specialized commands, cognitive personas, and development methodologies.**

## 🎯 Background

Gemini CLI provides powerful capabilities but can benefit from:
- **Specialized expertise** for different technical domains
- **Token efficiency** for complex projects  
- **Evidence-based approaches** to development
- **Context preservation** during debugging sessions
- **Domain-specific thinking** for various tasks

## ✨ SuperGemini Features

SuperGemini enhances Gemini CLI with:
- **20 Specialized Commands** covering development lifecycle tasks
- **9 Cognitive Personas** for domain-specific approaches
- **Token Optimization** with compression options
- **Evidence-Based Methodology** encouraging documentation

## 🚀 Installation

Currently, SuperGemini is a standalone project. To use it, you would clone the repository and run the `main.py` script with Python.

```bash
# Clone the repository
git clone <repository_url>
cd SuperGemini

# Install dependencies (if any)
# pip install -r requirements.txt 
```

## 🚀 Using SuperGemini with Gemini CLI

SuperGemini can be integrated with Gemini CLI to provide a powerful and flexible command-line experience. The integration is achieved by exposing the SuperGemini commands as a set of tools that can be called by the Gemini model.

For more information on how to use SuperGemini with Gemini CLI, please see the [Gemini CLI Integration Guide](docs/gemini-cli-integration.md).

## 💡 Core Capabilities

### 🧠 **Cognitive Personas**
Switch between different approaches with persona flags:

```bash
/analyze --persona-architect     # Systems thinking approach
/build --persona-frontend       # UX-focused development  
/scan --persona-security     # Security-first analysis
```

### ⚡ **20 Commands**
Development lifecycle coverage:

*   analyze
*   build
*   cleanup
*   deploy
*   design
*   dev_setup
*   document
*   estimate
*   explain
*   git
*   improve
*   index
*   load
*   migrate
*   review
*   scan
*   spawn
*   task
*   test
*   troubleshoot

### 📊 **Token Efficiency**
SuperGemini's template system helps manage token usage:
- **UltraCompressed mode** option for token reduction
- **Template references** for configuration management
- **Caching mechanisms** to avoid redundancy
- **Context-aware compression** options

## 🎮 Example Workflows

### Tutorial: Developing Your First Feature with SuperGemini

This tutorial will guide you through a common development workflow using several SuperGemini commands to plan, design, and implement a new feature.

For this tutorial, we will be adding a new "hello" command to our application.

## Step 1: Design the Feature (`/design`)

Before we write any code, we should use the `/design` command to think through the feature's requirements and architecture.

```bash
python main.py design --persona architect
```

In a real scenario, you would provide a more detailed prompt to the `design` command, but for now, we'll just activate the `architect` persona to put the AI in a design-oriented mindset.

## Step 2: Create the Command Files (`/build`)

Now that we have a basic design, we can use the `/build` command to create the necessary files for our new command.

```bash
python main.py build --feature hello
```

This command would (in a full implementation) create the following files:
*   `commands/hello.yml` (the command definition)
*   `commands/hello.py` (the command logic)

## Step 3: Implement the Command Logic

With the files created, you would now open `commands/hello.py` and add the logic for the command.

```python
# commands/hello.py
from commands.command import Command

class HelloCommand(Command):
    def __init__(self):
        super().__init__("hello", "Prints a greeting.")

    def execute(self, args):
        print("Hello, SuperGemini user!")
```

You would also add the new command to the `commands/registry.yml` file.

## Step 4: Test the New Command (`/test`)

After implementing the command, it's crucial to test it.

```bash
python main.py test --command hello
```

This would run the specific tests for the `hello` command, ensuring it works as expected.

## Step 5: Document the Feature (`/document`)

Finally, good developers document their work. Use the `/document` command to generate documentation for your new feature.

```bash
python main.py document --feature hello
```

This would update the `command-reference.md` and potentially other documentation files with information about the new `hello` command.

## Conclusion

Congratulations! You've successfully used SuperGemini to guide you through a complete feature development workflow. You've seen how different commands and personas can be used at various stages of the development process to ensure a well-designed, well-tested, and well-documented feature.

## 🎭 Available Personas

| Persona | Focus Area |
|---|---|
| **architect** | System design |
| **frontend** | User experience |
| **backend** | Server systems |
| **security** | Security analysis |
| **analyzer** | Problem solving |
| **qa** | Quality assurance |
| **performance** | Optimization |
| **refactorer** | Code quality |
| **mentor** | Knowledge sharing |

## 🔧 Technical Architecture

**🏗️ Modular Configuration**
- **config/** – Core configuration with YAML files
- **commands/** – Reusable command patterns
- **personas/** – Persona definitions
- **validators/** – Validation rules
- **token_managers/** – Token management strategies

**🎯 Unified Command System**
- **20 Commands** – Development lifecycle coverage
- **Universal Flags** – Universal flags on all commands, including `--persona`, `--verbose`, `--quiet`, `--uc`, and `--markdown`.
- **Persona Integration** – 9 cognitive modes as flags

**📦 Architecture Benefits**
- **Single Source of Truth** – Centralized updates
- **Easy Extension** – Add new commands/flags
- **Consistent Behavior** – Unified flag handling
- **Reduced Duplication** – Template-based configuration

**✅ Quality Features**
- **Evidence-Based Approach** – Documentation encouraged
- **Error Recovery** – Graceful failure handling
- **Structured Output** – Organized file locations