Dance Debugger ππ
Every bug tells a story through movement: - **Null pointer** β The Vanishing Partner (reaching for someone who isn't there) - **Infinite loop** β The Endless Waltz (spinning forever, never advancing) - **Race condition** β The Collision Tango (two dancers fighting for the same spot) - **Memory leak** β The Growing Ensemble (dancers keep joining, none leave) - **Stack overflow** β The Tower of Lifts (stacking lifts until collapse)
Full Public Reader
Dance Debugger ππ
Debug code through interpretive movement. Bugs become choreography.
> Generation 13 β The Improv: Live exploratory debugging through code mutation
Philosophy
Every bug tells a story through movement:
- Null pointer β The Vanishing Partner (reaching for someone who isn't there)
- Infinite loop β The Endless Waltz (spinning forever, never advancing)
- Race condition β The Collision Tango (two dancers fighting for the same spot)
- Memory leak β The Growing Ensemble (dancers keep joining, none leave)
- Stack overflow β The Tower of Lifts (stacking lifts until collapse)
Commands
Analyze Bug
/dance analyze <error_message_or_code>Translates an error or problematic code into choreography notation.
Visualize Flow
/dance flow <function_or_file>Shows code execution as a dance sequence diagram.
Debug Session
/dance debug <file>Interactive debugging where each step is a dance move.
Choreograph Fix
/dance fix <bug_description>Suggests fixes using dance metaphors ("add a partner check before the lift").
Dance Notation
DANCER: variable/object
STAGE: function/scope
MOVE: operation
TEMPO: execution speed
FORMATION: data structureMove Types
| Move | Code Concept |
|---|---|
| πΆ Walk | Sequential execution |
| π Spin | Loop iteration |
| π€ Partner | Function call |
| β¬οΈ Lift | Push to stack |
| β¬οΈ Land | Pop from stack |
| π Wave | Return value |
| πͺ Exit | Return/break |
| π₯ Fall | Exception/crash |
| π Mirror | Recursion |
| π₯ Ensemble | Array/collection |
Example Output
Input:
def process(items):
for item in items:
if item.value is None:
item.transform() # NullPointerException here!Dance Analysis:
π CHOREOGRAPHY: "The Phantom Transform"
SCENE: process() stage
DANCERS: items (ensemble), item (solo)
SEQUENCE:
1. π₯ Ensemble enters stage left (items arrives)
2. π Solo breakout begins (for loop)
ββ Each dancer steps forward in turn
3. π Partner check (if condition)
ββ "Is your value partner present?"
4. π₯ THE BUG: Attempted transform without partner!
ββ Dancer reaches for phantom partner
ββ Falls into the void (NullPointerException)
DIAGNOSIS: "The Vanishing Partner"
The dancer attempts a partnered move (transform)
but never verified the partner (value) exists.
CHOREOGRAPHY FIX:
Add "Partner Present Check" before the lift:
if item.value is not None: # π€ Confirm partner
item.transform() # π Safe to danceIntegration
# CLI usage
python [home-path] analyze "TypeError: 'NoneType' object has no attribute 'split'"
# With file
python [home-path] flow path/to/buggy.pyVisualization
The `visualizer.html` opens an interactive stage where:
- Code blocks are dancers
- Execution flow is choreographed movement
- Errors show as dramatic falls
- Fixes animate the corrected dance
Why Dance?
Debugging is often about flow and timing:
- Where does execution go?
- When do things happen?
- Who interacts with whom?
Dance captures all of this intuitively. When you see a bug as "two dancers colliding because they didn't count the beat," the race condition becomes visceral.
---
Gen 8: Ensemble Choreography πͺ
Distributed System Dances
Microservices, APIs, and distributed systems are ensemble performances:
| Pattern | Choreography | Bug Type |
|---|---|---|
| πͺ Circus Ring | Service mesh | Cascading failure |
| π Relay Race | Request pipeline | Dropped baton (timeout) |
| π£ Call & Response | API request/response | Echo lost (404/500) |
| π Bell Choir | Event-driven | Missed cue (event lost) |
| π Masquerade | Auth flow | Wrong mask (token invalid) |
New Commands
# Analyze distributed trace
/dance trace <jaeger_trace_id>
# Choreograph microservice interaction
/dance ensemble <service_map.yaml>
# Export as animated performance
/dance perform <analysis> --format gif|mp4|lottieThe Distributed Dance Vocabulary
π VENUE: service/container
π TRANSPORT: HTTP/gRPC/message queue
π« TICKET: request ID / correlation ID
β±οΈ TEMPO: latency (andante = slow, presto = fast)
π SILENCE: timeout
π’ ENCORE: retry
π· STAGE DOOR: circuit breakerExample: The Timeout Tragedy
Scenario: Service A calls B calls C, C times out
π ENSEMBLE: "The Waiting Game"
VENUES:
π Service A (Prima Donna)
π Service B (Corps de Ballet)
π Service C (The Phantom)
ACT I - The Request
A π«β B: "Dance with C for me" (POST /process)
B π«β C: "Join us" (GET /data)
ACT II - The Silence
C: π [30 seconds of nothing]
B: π° Frozen mid-gesture, waiting...
A: π€ "Where is my partner?!"
ACT III - The Cascade
C: π Never responds (timeout)
B: π₯ Falls (504 Gateway Timeout)
A: π₯ Crashes into B (propagated error)
DIAGNOSIS: "The Phantom Performer"
Service C never took the stage.
No understudy (fallback), no stage manager (circuit breaker).
CHOREOGRAPHY FIX:
1. π· Add Stage Door (circuit breaker on BβC)
2. π Hire Understudy (fallback response)
3. β±οΈ Set Tempo Limits (timeout < caller's timeout)Performance Mode π¬
Export your debug dance as shareable content:
# Generate animated GIF
python choreo.py perform analysis.json --output bug-dance.gif
# Create Lottie animation for web
python choreo.py perform analysis.json --output dance.lottie
# Full video with music
python choreo.py perform analysis.json --output debug-musical.mp4 --music dramaticMusic Moods by Bug Type
| Bug | Music | Vibe |
|---|---|---|
| NullPointer | Debussy - Clair de Lune | Melancholic, reaching |
| InfiniteLoop | Ravel - BolΓ©ro | Repetitive, building |
| RaceCondition | Stravinsky - Rite of Spring | Chaotic, competitive |
| MemoryLeak | Wagner - Ride of the Valkyries | Accumulating doom |
| Timeout | Cage - 4'33" | Silence... waiting... |
Multi-Language Support π
Gen 8 expands beyond Python:
| Language | AST Parser | Dance Style |
|---|---|---|
| Python | `ast` | Classical ballet |
| JavaScript | `@babel/parser` | Contemporary |
| TypeScript | `ts-morph` | Modern ballet |
| Rust | `syn` | Flamenco (passionate, strict) |
| Go | `go/parser` | Line dancing (simple, parallel) |
---
Gen 9: Rehearsal Mode π¬
Live debugging as interactive dance performance. Step through code like a director running a rehearsal.
Philosophy
Debugging should feel like directing a play:
- Step = Move to the next beat
- Rewind = "Let's take that scene again"
- Breakpoint = "Freeze! Hold that position!"
- Troupe = Variables currently on stage
New Commands
# Interactive rehearsal
python rehearsal.py rehearse script.py
# Set breakpoints
python rehearsal.py rehearse script.py -b 15 -b 23
# Full choreography script
python rehearsal.py script script.py --mode comedic
# Export for visualization
python rehearsal.py export script.py -o choreo.jsonRehearsal Controls
| Command | Action |
|---|---|
| `n` / `next` | Execute one dance step |
| `r` / `rewind` | Step back one beat |
| `s` / `status` | Show troupe on stage |
| `b <line>` | Toggle breakpoint |
| `q` / `quit` | End rehearsal |
Narration Modes
π Dramatic (default)
> "The ensemble assembles for `items`'s grand number!"
π Minimalist
> `items β»`
π Comedic
> "π items goes brrrrr (it's a loop, they're stuck)"
The Troupe System
Every variable is a dancer with:
- Position on stage (x, y)
- Costume (type)
- Energy level (0-10, decreases with use)
# Example troupe status
π On Stage:
items: [...] (list) [βββββ] @(50, 80)
result: None (NoneType) [βββββ] @(120, 80)
counter: 5 (int) [βββββ] @(180, 120)Bug Biography π
Track a bug's life story from birth to fix:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
π THE BIOGRAPHY OF: The Phantom Partner
(bug-2024-001)
βββββββββββββββββββββββββββββββββββββββββββββββββββ
π PROLOGUE
Born: 2024-01-15 in utils.py:47
Introduced by commit: a1b2c3d4
Dance Style: The Vanishing Partner
π ACT 1: Introduction
First appeared when user.profile was optional
π ACT 2: Discovery
Crashed in production on 2024-01-18
3 users affected
π¬ FINALE
Fixed: 2024-01-19
Vanquished by: f5e6d7c8
The Vanishing Partner has ended. The stage is clear.Troupe Memory π§
The troupe learns from past performances:
memory = TroupeMemory("[home-path])
# When a familiar pattern appears...
recognized = memory.recognize(choreography)
# > π DΓ©jΓ vu! This looks like 'The Phantom Partner' (seen 3x).
# > Try: Add None check before method callVisual Rehearsal (HTML)
Open `rehearsal-viz.html` for an interactive stage:
- π Watch dancers (variables) move in real-time
- π Code highlighted as execution progresses
- π΄ Click line numbers to set breakpoints
- β―οΈ Auto-play or step through manually
- π Switch narration modes on the fly
Keyboard shortcuts:
| Key | Action |
|-----|--------|
| `Space` | Play/Pause |
| `β` / `n` | Next step |
| `β` / `p` | Previous step |
| `r` | Reset |
| `l` | Load new code |
Integration with Gen 8 Ensemble
Rehearsal Mode works with distributed traces too:
# Step through a distributed trace
python rehearsal.py rehearse --trace trace_id_from_jaeger
# Watch services dance together
# Each venue (service) becomes a stage region
# Messages are dancers traveling between regions---
"Every bug is just a dancer who lost the beat." π
"Every distributed failure is an ensemble that forgot the choreography." πͺ
"Debugging is directing the performance until it's ready for opening night." π¬
"Every master was once a disaster." π
---
Gen 10: Dance Battles π₯
Comparative debugging as competitive choreography. Pit two implementations against each other in a dance-off!
Philosophy
Code review shouldn't be boring. When comparing implementations:
- Old vs New = Champion defending their title
- Your code vs Library = Local talent vs imported star
- Before fix vs After = Redemption arc
Battle Categories
| Category | What's Judged | Score |
|---|---|---|
| π Style | Code elegance, readability | 0-10 |
| π©° Grace | Error handling, recovery | 0-10 |
| β‘ Tempo | Execution speed | 0-10 |
| π― Precision | Correctness | 0-10 |
| πͺ Endurance | Memory efficiency | 0-10 |
| π€ Synchrony | API compatibility | 0-10 |
Commands
# Full battle with test suite
python battle.py battle impl_a.py impl_b.py \
-f my_function \
-t tests.json \
-n "Challenger" "Champion" \
--track
# Quick one-round comparison
python battle.py quick \
--a "def f(x): return x*2" \
--b "def f(x): return x+x" \
-f f \
-i "[5]" \
-e "10"
# Analyze style alone
python battle.py style my_code.py
# View rivalry history
python battle.py rivalry "OldSort" "NewSort"Test Cases Format
[
{"input": [5, 3, 8, 1], "expected": [1, 3, 5, 8]},
{"input": [], "expected": []},
{"input": [1], "expected": [1]}
]Style Metaphors
The Style Judge interprets code as dance styles:
| Pattern | Dance Style |
|---|---|
| Clean, simple | π©° Classical ballet β pure technique |
| Deep nesting | πͺ Circus contortionist β impressive but risky |
| Comprehensions | π« Flow state β each move flows naturally |
| Heavy try/catch | π‘οΈ Cautious waltz β always checking the floor |
| Minimal code | π Minimalist mime β saying more with less |
Tempo Metaphors
| Speed | Tempo | Score |
|---|---|---|
| < 1ms | β‘ Presto furioso | 10 |
| < 10ms | π Allegro | 9 |
| < 100ms | πΆ Andante | 7 |
| < 1s | π’ Adagio | 5 |
| < 5s | π¦₯ Largo | 3 |
| Timeout | βΈοΈ Fermata | 0 |
Grace Metaphors
| Outcome | Description | Score |
|---|---|---|
| π― Perfect | Correct result, no errors | 10 |
| π€Έ Recovered | Wrong but didn't crash | 6 |
| π₯ Fell | Handled exception | 4 |
| π Crashed | Unhandled exception | 2 |
| π» Vanished | Silent failure | 0 |
Rivalry Tracking
Every battle is recorded. Rematches build drama!
βοΈ Rivalry: quicksort_v1 vs quicksort_v2
Battles: 7
Record: 2-5-0
π quicksort_v2 leads but it's competitive!Battle Narrative Example
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π D A N C E B A T T L E π β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΅ DANCER A: bubble_sort
Source: old_sort.py
Style: 6.2/10
π΄ DANCER B: quick_sort
Source: new_sort.py
Style: 8.5/10
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¬ Round 1: The Opening Salvo
Input: ([5, 3, 8, 1, 9],)
π DANCER B takes this round!
TEMPO: A=5.0 | B=9.0
GRACE: A=10.0 | B=10.0
STYLE: A=6.2 | B=8.5
π¬ Round 2: The Counter Strike
Input: ([1000 random integers],)
π DANCER B takes this round!
TEMPO: A=2.0 | B=9.5
GRACE: A=10.0 | B=10.0
STYLE: A=6.2 | B=8.5
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π F I N A L V E R D I C T π
Rounds won: A=0 | B=2
π quick_sort IS THE CHAMPION! π
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββVisual Battle Arena
Open `battle-viz.html` for an interactive battle visualization:
- Animated dancer avatars
- Round-by-round breakdown with score bars
- Rivalry history timeline
- Stage animation with spotlights
- Drag & drop JSON loading
Use Cases
| Scenario | Battle Setup |
|---|---|
| Code review | PR branch vs main |
| Optimization | Before vs after |
| Library choice | Option A vs Option B |
| Regression test | Old working vs new broken |
| Learning | Student impl vs reference |
| Refactor validation | Messy vs clean |
Integration with Previous Gens
# Rehearse both implementations side-by-side
python rehearsal.py compare impl_a.py impl_b.py -f sort
# Generate choreography for the winner
python choreo.py flow winner.py --celebrate
# Ensemble battle: distributed system A vs B
python ensemble.py battle service_a.yaml service_b.yaml---
"Every implementation is a dancer. Every comparison is a battle." π₯
"May the best algorithm win." π
---
Gen 11: Dance Academy π
Learn debugging through legendary performances. Bugs become lessons, patterns become exercises, and your progress is tracked on a Dance Card.
Philosophy
Debugging mastery comes through practice. The Academy:
- Turns famous bugs into Hall of Infamy lessons
- Creates exercises from common patterns
- Tracks your skills with a Dance Card
- Provides personalized curriculum based on weak areas
- Offers mentorship with dance-metaphor coaching
The Hall of Infamy
Legendary bug patterns immortalized as dances:
| Dance | Bug | Category | Difficulty |
|---|---|---|---|
| π» The Phantom Partner | NullPointer | null | β |
| π The Endless Waltz | Infinite Loop | loop | ββ |
| βοΈ The Collision Tango | Race Condition | race | ββββ |
| π― The Growing Ensemble | Memory Leak | memory | βββ |
| π The Wrong Costume | Type Error | type | ββ |
| πΌ The Tower of Lifts | Stack Overflow | recursion | βββ |
| π³οΈ The Off-Stage Reach | Index OOB | bounds | β |
| π The Forgotten Finale | Resource Leak | resource | ββ |
| πΆ The Silent Stumble | Swallowed Exception | exception | βββ |
| π The Premature Bow | Early Return | logic | ββ |
Commands
# View all legendary patterns
python academy.py hall
# Check your dance card and progress
python academy.py status
# Get today's recommended practice
python academy.py daily
# Start interactive practice session
python academy.py practice
# Practice specific pattern
python academy.py practice --pattern phantom-partner
# Generate personalized curriculum
python academy.py curriculum --weeks 4The Dance Card
Your progress is tracked like a dancer's training journal:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π DANCE ACADEMY β DAILY BRIEFING
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Good morning, dancer!
π YOUR DANCE CARD
Exercises completed: 12
Practice streak: 5 days π₯
Achievements: 3
π― SKILL LEVELS
null [ββββββββββ] 80%
type [ββββββββββ] 60%
loop [ββββββββββ] 50%
memory [ββββββββββ] 40%
recursion [ββββββββββ] 30%Skill Tracking
Skills improve through spaced repetition:
- Success β Skill increases (diminishing returns near mastery)
- Failure β Skill decreases (learn from mistakes)
- Mastery threshold β 90
Interactive Practice Session
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π DANCE ACADEMY β The Vanishing Partner
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π THE STORY
Reaching for a partner who was never there
π¬ THE CHOREOGRAPHY
π The Vanishing Partner
1. Dancer A reaches hand out β π€
2. Expected: Partner B takes hand β π€
3. Reality: B was never there β π¨
4. A falls into void β π₯
FIX: Check stage before reaching β ππ€π€
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π EXERCISE: The Greeting Card
Difficulty: β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
def create_greeting(user):
return f"Dear {user.name}, Happy Birthday!"
print(create_greeting(User("Alice"))) # Works
print(create_greeting(None)) # π₯ BUG HERE
π― Find and describe the fix for the bug.
(Type 'hint' for hints, 'skip' to see answer, 'quit' to exit)
π¬ Your answer:The Mentor System
AI coaching with dance metaphors:
Encouragements:
> "Every great dancer started with a stumble!"
> "That's the kind of mistake that makes you unforgettable - once you fix it."
Celebrations:
> "π Bravo! You've mastered that move!"
> "π« You dance with the code now."
Graduation:
When you reach 90
Achievements
Unlock achievements through practice:
| Achievement | Criteria | Badge |
|---|---|---|
| π©° First Steps | Complete 1 exercise | Beginner |
| π Apprentice | Complete 5 exercises | Learning |
| π Journeyman | Complete 15 exercises | Competent |
| π Master | Complete 30 exercises | Expert |
| π» Phantom Slayer | Master null handling | Specialist |
| π Loop Breaker | Master loop control | Specialist |
| π₯ Week Streak | 7 day practice streak | Dedication |
| π Well Rounded | 50 |
Personalized Curriculum
The Academy generates a learning plan based on your weaknesses:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π DANCE ACADEMY β PERSONALIZED CURRICULUM
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π
WEEK 1: Fundamentals
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Day 1: The Off-Stage Reach
π Category: bounds
β Difficulty
Skill: 35%
Day 2: The Phantom Partner
π Category: null
β Difficulty
Skill: 30%
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π
WEEK 2: Intermediate
...Visual Academy
Open `academy-viz.html` for an interactive learning experience:
- π³ Dance Card dashboard with stats
- ποΈ Hall of Infamy pattern browser
- π― Skill progression bars
- π Achievement showcase
- π Animated stage for each bug pattern
- π Interactive exercise solving
Integration with Previous Gens
The Academy builds on all previous generations:
# Learn a pattern, then see it in code flow (Gen 7)
python academy.py practice --pattern endless-waltz
python choreo.py flow my_buggy_loop.py
# Master distributed patterns with Ensemble (Gen 8)
python academy.py practice --pattern timeout-tragedy
python ensemble.py analyze my_service.yaml
# Practice debugging with Rehearsal (Gen 9)
python academy.py practice --pattern tower-of-lifts
python rehearsal.py rehearse recursive.py
# Test your mastery with Battles (Gen 10)
python academy.py status # Check your skills first
python battle.py battle your_fix.py reference.pyReal-World Famous Bugs
Each pattern includes historical context:
The Phantom Partner (Null):
- Tony Hoare's "billion dollar mistake"
- 70
The Endless Waltz (Loop):
- Early Windows "Not Responding" freezes
- The 2003 Northeast blackout
The Collision Tango (Race):
- Therac-25 radiation overdoses
- 2012 Knight Capital $440M trading loss
---
Gen 12: The Dance Critic π
Proactive code review as dance critique. Before bugs appear, the Critic watches your code perform and offers constructive feedback.
Philosophy
> "Every great dancer needs a great critic."
The Critic doesn't wait for falls β they watch the rehearsal and offer notes:
- Timing β Performance potential
- Balance β Complexity management
- Chemistry β Module coupling
- Presence β Naming and clarity
- Costume β Type safety
- Flow β Control flow patterns
Commands
# Full review with scorecard
python critic.py review <file>
# Just the numeric scores (JSON)
python critic.py score <file>
# Style/formatting check
python critic.py style <file>
# Analyze module coupling in directory
python critic.py chemistry <directory>
# Full audition with verbose JSON report
python critic.py audition <file>
# Compare two implementations
python critic.py compare <file1> <file2>The Scorecard
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π DANCE CRITIQUE: mycode.py
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π SCORECARD
ββββββββββββββββββββββββββββββββββββββββ
β±οΈ Timing (Performance): 85/100
βοΈ Balance (Complexity): 72/100
π Chemistry (Coupling): 90/100
β Presence (Clarity): 68/100
π Costume (Typing): 55/100
π Flow (Control): 80/100
ββββββββββββββββββββββββββββββββββββββββ
π TOTAL: 75/100
π Well Done β Solid work with room for growthCritique Categories
β±οΈ Timing (Performance)
- Loop nesting depth
- O(nΒ²) or worse algorithms
- String concatenation in loops
- Repeated expensive operations
βοΈ Balance (Complexity)
- Function size (AST nodes)
- Cyclomatic complexity
- Number of branches
π Chemistry (Coupling)
- Import count
- Global state usage
- Inter-module dependencies
β Presence (Clarity)
- Docstring coverage
- Naming quality
- Single-letter variables
π Costume (Typing)
- Type hint coverage
- Return type annotations
- Parameter annotations
π Flow (Control Flow)
- Nesting depth
- Multiple return points
- Bare except clauses
Critique Notes
Each note includes:
- Category and severity
- Line number (when applicable)
- Descriptive message
- Dance metaphor
- Actionable suggestion
Severity Levels:
| Emoji | Severity | Meaning |
|-------|----------|---------|
| π΄ | critical | Show-stopper |
| π | warning | Significant issue |
| π‘ | concern | Worth addressing |
| π΅ | note | Minor observation |
| π’ | praise | Positive feedback |
Example Critique Note
π [BALANCE] L154
'analyze_error' is attempting too many moves at once (187 nodes)
π€Ή Juggling too many props β something will drop
π‘ Break this routine into smaller, focused performances.The Dance Battle (Compare Mode)
Compare two implementations side-by-side:
π DANCE BATTLE COMPARISON
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Metric solution_a.py solution_b.py
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
timing 85 β 72
balance 70 = 70
chemistry 80 β 95
presence 65 β 55
costume 90 β 95
flow 75 β 60
total 78 β 74
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββVerdict Scale
| Score | Verdict | Emoji |
|---|---|---|
| 90-100 | Standing Ovation | π |
| 80-89 | Bravo! | π |
| 70-79 | Well Done | π |
| 60-69 | Promising | π€ |
| 40-59 | Keep Practicing | π |
| 20-39 | Rough Start | π¬ |
| 0-19 | Technical Difficulties | π |
Integration with Previous Gens
Use the Critic proactively, then debug reactively:
# 1. Critic catches potential issues early
python critic.py review my_new_feature.py
# β οΈ Warning: 'chemistry' score low (too many imports)
# 2. Fix issues before they become bugs
# ... refactor to reduce coupling ...
# 3. If bugs still appear, use Academy to learn
python academy.py practice --pattern collision-tango
# 4. Rehearse the fix step by step
python rehearsal.py rehearse fixed_feature.py
# 5. Battle test against reference implementation
python battle.py battle my_fix.py reference.pyThe Complete Dance Debugger Stack
| Gen | Component | Purpose | When to Use |
|---|---|---|---|
| 7 | `choreo.py` | Core choreography | Understanding bugs |
| 8 | `ensemble.py` | Distributed analysis | Microservice issues |
| 9 | `rehearsal.py` | Step-through debugging | Execution flow |
| 10 | `battle.py` | Comparative debugging | Testing fixes |
| 11 | `academy.py` | Learning & progression | Skill building |
| 12 | `critic.py` | Proactive review | Before bugs appear |
| 13 | `improv.py` | Exploratory mutation | Unknown bugs |
The Improv Ensemble
Gen 13 introduces improvisational debugging β when choreographed approaches fail, explore the bug space dynamically through mutation:
| Dancer | Role | Moves |
|---|---|---|
| π Shapeshifter | Value mutation | null_swap, type_morph, boundary_push, sign_flip |
| π Flow Rider | Control flow | branch_flip, loop_skip, early_exit, exception_surface |
| π² Wildcard | Input fuzzing | random, adversarial, unicode_storm, timing_warp |
| πͺ Mirror | Bisection | bisect_cut, delta_isolate, regression_hunt |
| πͺ Ringmaster | Orchestrator | Sessions, journal, discovery analysis |
Improv Commands
# Start an improv session β explore all mutations
python improv.py explore myfile.py
# Focus on one function
python improv.py explore myfile.py --function process_data
# Apply specific mutation strategy
python improv.py mutate myfile.py --strategy shapeshifter
# Fuzz a function's inputs
python improv.py fuzz myfile.py --function calculate
# Cross-pollinate patterns between files
python improv.py jam file1.py file2.py
# Review past sessions
python improv.py journalKey Discoveries
The Improv finds things choreographed debugging misses:
- Complexity hotspots β code points with too many possible mutations
- Null vulnerabilities β values that could vanish without guards
- Branch complexity β too many forks in the choreography
- Dead code β moves no one ever dances
- Cross-pollination β patterns one file uses that another should learn
The Critic's Wisdom
The Critic speaks in dance metaphors that make code issues visceral:
- "β±οΈ The tempo drags β consider picking up the pace."
- "βοΈ Losing balance frequently β simplify the choreography."
- "π These partners should NOT be dancing together."
- "β Looks lost β where's the choreographer?"
- "π No type hints?! Dancing in the raw!"
- "π Spinning deeper and deeper into the abyss."
---
"Every master was once a disaster." π
"The stage is yours. Dance with confidence." π
"When the choreography fails, the best dancers improvise." πͺ
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
homelab/clawdbot/skills/dance-debugger/SKILL.md
Detected Structure
Method Β· Evaluation Β· Code Anchors Β· Architecture