g3-cli 0.2.2

CLI interface for G3/GB AI coding agent
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# โœจ๐Ÿ’– 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
# On macOS: VisionBridge dylib is auto-copied for screen capture 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?* โœจ