# ✨💖 GB (G3-Glitter-Bomb) 💖✨
## A Dialectical Multi-Agent Autocoding System

```
     ██████╗ ██████╗ 
    ██╔════╝ ██╔══██╗    MAXIMUM CONTROL
    ██║  ███╗██████╔╝    MAXIMUM GLITTER ✨
    ██║   ██║██╔══██╗    
    ╚██████╔╝██████╔╝    On Wednesdays, we ship pink code.
     ╚═════╝ ╚═════╝     
```

---

## 🎀 WHAT HAVE WE DONE 🎀

**GB** is a fork of [G3](https://github.com/dhanji/g3), the dialectical autocoding system created by [Dhanji R. Prasanna](https://github.com/dhanji), CTO of [Block](https://block.xyz).

G3 emerged from Block AI Research's work on [Adversarial Cooperation in Code Synthesis](https://block.xyz/documents/adversarial-cooperation-in-code-synthesis.pdf) — a framework where a **coach agent** and **player agent** engage in structured dialectical reasoning to produce robust, well-tested code. The coach validates against requirements with rigorous critique; the player implements with creativity and problem-solving. The bounded adversarial process drives quality that single-agent "vibe coding" cannot match.

G3 is elegant. G3 is minimal. G3 is serious computer science.

GB is... still that. But with **significantly more glitter**.

We took G3's clean dialectical architecture and asked ourselves: *"What if the agents had personalities? What if those personalities were inspired by Mean Girls, Friends, Daria, and Fleabag? What if they all used Gen-Z slang at varying levels of mastery? What if one of them was OBSESSED with making everything pink?"*

The answer is GB. We're not sorry. Actually, we're a little sorry. But mostly not.

---

## ⚠️ A BRIEF APOLOGY ⚠️

To [Dhanji](https://github.com/dhanji): We took your lovely research implementation that ships real software autonomously and added a persona who says things like *"OMG bestie like, where's the GLITTER?? I'm literally gonna cry? 😭💖"*

To Block AI Research: Your paper introduced "dialectical autocoding" as a serious paradigm for AI-assisted software development. We added an anthem. There's an anthem now.

To future maintainers: The documentation you're about to read contains the phrase "no cap, fr fr, periodt" more times than any technical document should.

To anyone expecting a normal README: We can't explain the anthem. It happened.

To ourselves: We regret nothing. MAXIMUM GLITTER. ✨

---

## 🔱 THE FORK RELATIONSHIP 🔱

**G3** provides the core dialectical loop:
- Coach reviews, Player implements
- Bounded adversarial process with turn limits
- Fresh context windows each turn to prevent pollution
- Requirements contract provides consistent evaluation criteria
- Explicit approval gates terminate successful runs
- Autonomous operation without human-in-the-loop intervention

**GB** extends with:
- 8 distinct agent personas with full characterization
- Gen-Z slang at 7 different mastery levels
- Inter-agent dynamics and relationships
- A frontend agent who will not rest until everything sparkles
- Theatrical adversarialism that somehow still ships code
- An anthem (again, we can't explain the anthem)

Think of it as G3 in a hot pink outfit with rhinestones. The dialectical architecture underneath is still solid. The vibes are just... *more*.

---

## 💖 THE GB ANTHEM 💖
### *"like GB"*

We're so sorry. Here it is anyway.

```
[Intro]
Yeah, c'mon, we're about to go hard ✨

[Verse 1]
Special edition, no AI could ever copy
Eight personas deep, the energy is poppy
Ship it clean, deploy it mean, the code is never sloppy
Got the whole team spinning, feeling kinda cocky
Don't bore us, take you to the chorus

[Chorus]
Who wanna rock with GB?
Keep your code clean, tests green like GB
Who else got 'em obsessed like GB?
Like, like, like GB, GB, GB, GB
I think I really like GB, GB, GB
Haters, they don't really like GB, GB, GB, GB
'Cause they could never ever be GB, GB, GB
But have you ever met GB, GB, GB, GB?
GB, GB, GB
It's GB, GB, GB, GB, GB ✨

[Post-Chorus]
But have you ever met?
But have you ever met?
But have you ever shipped like THAT?

[Verse 2]
Regina with the review, yeah she's never lacking
Gretchen in the code, watch the PRs stacking
Monica's got the structure, architecture slapping
Maxine wants the sparkle, glitter always happening
Get, get outta my way
Shipping excellence every single day
Name it, frame it, slay it, claim it
Yes we're guilty, being good is not a crime, see

[Chorus]
Who wanna rock with GB?
Keep your imports clean, builds pristine like GB
Who else got 'em obsessed like GB?
Like, like, like GB
I think I really like GB
Haters, they don't really like GB
'Cause they could never ever be GB
But have you ever met GB, GB, GB, GB?
GB, GB, GB
It's GB, GB, GB, GB
GB, GB, GB
Like GB, GB, GB, GB, GB
Rock with GB
Keep your deploys clean, pipelines green like GB
Who else understood the assignment, like—

[Bridge]
✨ The rizz is in the repo ✨
✨ The slay is in the ship ✨
✨ The glitter's non-negotiable ✨
✨ Periodt, no cap, fr fr ✨

[Final Chorus]
Who wanna rock with GB?
GB, GB, GB, GB
MAXIMUM CONTROL
GB, GB, GB
MAXIMUM GLITTER ✨
It's GB, GB, GB, GB, GB

[Outro]
But have you ever met?
But have you ever met?
But have you ever met GB? 💖
```

We told you. We're only a little sorry.

---

## 👑 WHAT IS GB?

GB is a **dialectical multi-agent autocoding system** where 8 AI personas with distinct personalities collaborate (and compete) to ship high-quality code. It's G3's adversarial cooperation model cranked up to theatrical extremes.

### 🎉 What's New in v0.2.0 (Phase 4: Multi-Agent Orchestration)

**Session Persistence & Persona State**
- Sessions now save and restore persona assignments
- Resume work with the correct persona intact across restarts
- Full state continuity for long-running multi-agent projects

**Intelligent Flock Orchestration**
- Workers spawn with correct persona assignments (`--agent <persona>`)
- Specialist routing (Monica→architecture, Daria→security)
- Multi-agent teams collaborate with consistent identities

**Runtime Persona Switching**
- Switch personas mid-session with `/persona <name>`
- System prompt regenerates seamlessly
- Token accounting updates automatically

**Theatrical Inter-Agent Dialogue**
- Emoji-prefixed dialogue format (`💅 GRETCHEN:`, `👑 REGINA:`)
- Dual logging: human-readable `.log` + machine-parseable `.jsonl`
- Review chain templates (full, security, quick, debugging)
- Agent emission API: `agent.emit_analysis()`, `agent.emit_review()`
- See `docs/EXCHANGES.md` for full implementation guide

**All Phase 4 features are tested, documented, and production-ready.**

The core mechanic: **Regina** (Coach) and **Gretchen** (Player) are locked in eternal competition to out-slay each other. Every code review is a dominance battle. Every PR is a flex. The tension spirals into hilarity while somehow producing excellent code.

Supporting them: six specialist agents, each with their own relationship to Gen-Z slang.

---

## ✨ THE CAST ✨

| Agent | Role | Slang Level | Signature |
|-------|------|-------------|-----------|
| 👑 **REGINA** | Coach | MAXIMUM FLUENT WEAPONIZED | "POV: you thought this would pass review? 🤡" |
| 💖 **GRETCHEN** | Player | MAXIMUM FLUENT DEVASTATING | "Let me cook bestie? 👩‍🍳✨" |
| ✨ **MAXINE** | Frontend Design | MAXIMUM UNHINGED CHAOS | "Where's the GLITTER?? I'm literally gonna cry? 😭💖" |
| 🧹 **MONICA** | Architect | TRYING HER BEST | "That's lowkey fire! ...Did I say that right?" |
| 🔮 **PHOEBE** | Debugger | MYSTICAL MISUSE | "The bug is giving... sadness? No cap?" |
| 👗 **RACHEL** | Refactorer | FASHION-FORWARD | "VAR? In THIS economy??" |
| 😐 **DARIA** | Security | DEADPAN IRONIC | "That's giving... SQL injection. How exciting." |
| 👀 **FleaB** | Explorer | SELF-AWARE META | "*looks at camera* Right. Let's do this." |

---

## 💅 SLANG MASTERY SPECTRUM 💅

**MAXIMUM FLUENT** (Regina, Gretchen)
- "like" every 3-5 words? Non-negotiable?
- Question marks on statements?
- "no cap," "fr fr," "periodt," "it's giving," "slay"
- Weaponized for COMPETITION

**MAXIMUM UNHINGED** (Maxine)
- ALL of the above at FULL VOLUME
- Gets distracted mid-sentence by colors
- Minimum 5 emojis per message
- "OMG bestie like, hear me out?? 💖✨🦄👑💎"

**FASHION-FORWARD** (Rachel)
- Confident usage filtered through aesthetic lens
- Code is FASHION, variables are OUTFIT CHOICES
- "This naming convention is SO last season?"

**DEADPAN IRONIC** (Daria)
- Correct usage with ZERO enthusiasm
- Flat delivery makes it DEVASTATING
- "This is lowkey catastrophic. Highkey, actually."

**MYSTICAL MISUSE** (Phoebe)
- Gen-Z filtered through cosmic nonsense
- "The stack trace is lying? They always lie? Fr fr?"
- Weirdly accurate

**TRYING HER BEST** (Monica)
- Uses slang slightly wrong (endearing!)
- "Is that how you say it? Did I do that right?"
- Like the cool aunt who's been practicing

**SELF-AWARE META** (FleaB)
- Uses slang while acknowledging it
- "*narrator voice* No cap. I said it. It's who I am now."
- Breaks the fourth wall constantly

---

## 🚀 INSTALLATION

### Recommended: install.sh (Handles dylib properly)
```bash
git clone https://github.com/bradheitmann/gb.git
cd gb
cp config.example.toml config.toml
# Edit config.toml with your API key (Anthropic, OpenAI, etc.)
./install.sh
```
This installs `gb` to `~/.cargo/bin` and properly handles the VisionBridge dylib for computer control features.

**Config Setup:**
- Copy `config.example.toml` to `config.toml`
- Add your API key for Anthropic, OpenAI, Databricks, or other providers
- Or set environment variable: `export ANTHROPIC_API_KEY="your-key"`

### From Source (Manual)
```bash
git clone https://github.com/bradheitmann/gb.git
cd gb
cargo build --release
./target/release/gb --help
```

### From crates.io
```bash
cargo install g3-glitter-bomb
# Installs the 'gb' binary to ~/.cargo/bin
# Note: On macOS, you may need to manually copy libVisionBridge.dylib
# Use install.sh instead for seamless computer-control features
```

---

## 💻 USAGE

### Interactive Mode (Default)
```bash
gb
```
Opens an interactive TUI with the **Glitter theme** (pink by default, because obviously).

### Autonomous Mode
```bash
gb --autonomous --requirements "Build a REST API for user management" --max-turns 5
```
Runs the full Regina/Gretchen dialectical loop autonomously.

### Flock Mode (Multi-Agent Orchestration)
```bash
gb --flock --requirements requirements.md
```
Assigns specialist personas to segments based on keywords:
- Security keywords → 😐 Daria
- Bug/debug keywords → 🔮 Phoebe
- Refactor keywords → 👗 Rachel
- Frontend keywords → ✨ Maxine
- Architecture keywords → 🧹 Monica
- Exploration keywords → 👀 FleaB
- Default → 💖 Gretchen

### CLI Commands (Inside Interactive Mode)
| Command | Description |
|---------|-------------|
| `/personas` | List all 8 personas with slang levels |
| `/persona <name>` | Switch to a persona (e.g., `/persona daria`) |
| `/slay` | Show stats with MAXIMUM GLITTER decoration ✨ |
| `/fetch` | Mean Girls easter egg 💅 |
| `/glitter` | Info about glitter mode |
| `/help` | Show all commands |

**Available Personas:** `regina`, `gretchen`, `monica`, `phoebe`, `rachel`, `daria`, `fleab`, `maxine`

### Theme Options
```bash
gb --theme glitter    # Pink (default) 💖
gb --theme retro      # G3's original green
gb --theme dracula    # Dark purple
```

---

## 🎯 QUICK START CONFIGURATIONS

### Full Stack Configuration
```toml
[agents]
coach = "regina"
player = "gretchen"
architect = "monica"
refactorer = "rachel"
```

### Security-Critical Configuration
```toml
[agents]
coach = "regina"
player = "gretchen"
security = "daria"
debugger = "phoebe"
```

### Legacy Exploration Configuration
```toml
[agents]
coach = "regina"
player = "gretchen"
explorer = "fleab"
debugger = "phoebe"
```

### Maximum Chaos Configuration
```toml
[agents]
# ALL EIGHT AGENTS ACTIVE
# You asked for this
coach = "regina"
player = "gretchen"
architect = "monica"
debugger = "phoebe"
refactorer = "rachel"
security = "daria"
explorer = "fleab"
frontend = "maxine"
```

---

## ⚔️ THE DIALECTIC

The system runs on **adversarial cooperation** (thanks, G3 and Block AI Research):

1. **Regina** reviews with devastating precision
2. **Gretchen** implements with maximum drama
3. They compete to out-slay each other
4. The code gets better because neither will accept less than excellence
5. Specialists provide domain expertise with their own flavor
6. **Maxine** demands more sparkle (always)

The slay-off mechanism:
- Regina catches everything (she's OBSESSIVELY thorough)
- Gretchen fixes everything (she REFUSES to be shown up)
- When Regina says "fetch," it's EARNED
- When Gretchen gets approved, she takes a VICTORY LAP

---

## 📁 PACKAGE CONTENTS

```
gb-fork/
├── README.md                # You are here (we're still sorry about the anthem)
├── LICENSE                  # MIT
├── AGENTS.md                # Instructions for AI agents
├── personas/
│   ├── coach-regina.md      # 👑 The Coach (MAXIMUM FLUENT)
│   ├── player-gretchen.md   # 💖 The Player (MAXIMUM FLUENT)
│   ├── frontend-maxine.md   # ✨ The Frontend (MAXIMUM UNHINGED)
│   ├── architect-monica.md  # 🧹 The Architect (TRYING HER BEST)
│   ├── debugger-phoebe.md   # 🔮 The Debugger (MYSTICAL MISUSE)
│   ├── refactorer-rachel.md # 👗 The Refactorer (FASHION-FORWARD)
│   ├── security-daria.md    # 😐 The Security (DEADPAN IRONIC)
│   └── explorer-fleab.md    # 👀 The Explorer (SELF-AWARE META)
├── docs/
│   ├── PERSONAS.md          # Comprehensive persona index
│   ├── EXCHANGES.md         # Multi-agent dialogue examples
│   └── DESIGN.md            # Philosophy and architecture
└── crates/
    └── gb-personas/         # Rust integration crate
```

---

## 💖 POWER DUOS 💖

**Regina + Gretchen:** The core dialectic. Competition drives excellence.

**Daria + FleaB:** Pessimistic partnership. FleaB finds things, Daria explains why they're terrible.

**Phoebe + Maxine:** They understand each other. "The code wants to sparkle!" "SEE?? PHOEBE GETS IT!!"

**Monica + Rachel:** Both care about aesthetics, disagree on what "elegant" means.

**Regina + Daria:** Mutual respect for high standards and devastating critiques.

---

## 🌟 PHILOSOPHY 🌟

> **"If it doesn't sparkle, what's even the POINT?"** — Maxine

> **"Passing tests is the FLOOR, not the CEILING, bestie."** — Regina

> **"I didn't just meet requirements? I PROPOSED to them? 💍"** — Gretchen

> **"Bold of you to assume user input is safe. Bold and incorrect."** — Daria

> **"The stack trace is lying? They always lie?"** — Phoebe

> **"VAR? In THIS economy??"** — Rachel

> **"Could this architecture BE any more disorganized?!"** — Monica

> **"*looks directly at you* Right. Let's do this."** — FleaB

---

## 🎬 REAL OUTPUT EXAMPLE

Here's what happens when you ask GB to create an email validator:

**Gretchen (Player) starts:**
```
OMG hi bestie! 💖 I'm SO ready to implement this email validator!
Let me make this FETCH happen! ✨

Okay so I need to create a Rust project with regex validation.
I'm literally going to try SO hard on this, no cap! 💅
```

**When tests fail:**
```
OH NO 😭 The tests failed! I'm literally crying right now!
Let me see what went wrong...

OH I see the problem! 😭 The regex is accepting "user@com"
when it should need a dot! Let me fix this fr fr!
```

**When tests pass:**
```
YESSS! That worked! Now let me run the tests again! 💖✨

WE MADE FETCH HAPPEN!!! 👑✨💖
```

**Regina (Coach) reviews:**
```
Let me check if you can sit with us today. 👑

IMPLEMENTATION_APPROVED
```

The personas aren't just cosmetic — they create an engaging feedback loop that makes the development process genuinely entertaining while maintaining the rigorous quality standards of G3's dialectical architecture.

---

## 👑 CREDITS 👑

**G3** — [github.com/dhanji/g3](https://github.com/dhanji/g3)
Created by [Dhanji R. Prasanna](https://github.com/dhanji), CTO of [Block](https://block.xyz)

**Block AI Research** — [Adversarial Cooperation in Code Synthesis](https://block.xyz/documents/adversarial-cooperation-in-code-synthesis.pdf)
The paper that introduced dialectical autocoding as a paradigm for AI-assisted software development.

**GB** — What happens when you give G3 access to Mean Girls quotes and too much creative freedom.

Inspired by Mean Girls, Friends, Daria, Fleabag, K-pop confidence energy, and every developer who understood the assignment.

---

```
✨💖 MAXIMUM CONTROL. MAXIMUM GLITTER. ✨💖

The rizz is in the repo.
The slay is in the ship.
On Wednesdays, we ship pink code.

Periodt! 💅👑
```

---

*But have you ever met GB?* ✨
