blue/.blue/docs/dialogues/2026-01-30T1730Z-rfc-0043-mermaid-diagram-standards.dialogue.recorded.md
Eric Garcia 006546b2fd feat: RFC 0043 Mermaid diagram standards
Establishes mandatory standards for Mermaid diagrams in Blue documents:
- Neutral theme required for dark/light mode compatibility
- Leaf node counting for LR flow warnings (>3 nodes)
- Plain text for architecture labels (no emoji color injection)
- Shape semantics advisory for new diagrams
- Auto-fix for theme declaration only (colors require manual review)

Includes alignment dialogue with 10/10 tensions resolved across 3 rounds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:58:32 -05:00

250 lines
9.8 KiB
Markdown

# Alignment Dialogue: RFC 0043 Mermaid Diagram Standards
**Date**: 2026-01-30 17:30Z
**Status**: CONVERGED ✓
**Participants**: 💙 Judge, 🧁 Muffin, 🧁 Cupcake, 🧁 Scone, 🧁 Eclair, 🧁 Donut
**RFC**: 0043-mermaid-diagram-standards
**Rounds**: 3 (0, 1, 2)
**Tensions**: 10 raised → 10 resolved
## Expert Panel
| Agent | Role | Tier | Relevance | Emoji |
|-------|------|------|-----------|-------|
| 💙 Judge | Orchestrator | — | — | 💙 |
| 🧁 Muffin | Technical Writer | Core | 0.95 | 🧁 |
| 🧁 Cupcake | UX Architect | Core | 0.90 | 🧁 |
| 🧁 Scone | DevOps Architect | Adjacent | 0.70 | 🧁 |
| 🧁 Eclair | Quality Engineer | Adjacent | 0.65 | 🧁 |
| 🧁 Donut | First Principles Reasoner | Wildcard | 0.40 | 🧁 |
## Alignment Scoreboard — FINAL
| Agent | Wisdom | Consistency | Truth | Relationships | **Total** |
|-------|--------|-------------|-------|---------------|----------|
| 🧁 Muffin | 7 | 8 | 7 | 6 | **28** |
| 🧁 Cupcake | 10 | 8 | 7 | 7 | **32** |
| 🧁 Scone | 9 | 9 | 8 | 7 | **33** |
| 🧁 Eclair | 7 | 9 | 7 | 7 | **30** |
| 🧁 Donut | 10 | 8 | 6 | 6 | **30** |
**Total ALIGNMENT**: 153
**Velocity**: 55 → 104 → 153 (+49, +49)
## Perspectives Inventory
| ID | Agent | Perspective | Round |
|----|-------|-------------|-------|
| P01 | 🧁 Muffin | Node counting heuristic fragility for subgraphs | 0 |
| P02 | 🧁 Muffin | `blue_lint` crate doesn't exist; needs clarification | 0 |
| P03 | 🧁 Cupcake | Emoji subgraph labels inject platform-dependent color | 0 |
| P04 | 🧁 Cupcake | 15-char edge label limit needs exception framework | 0 |
| P05 | 🧁 Scone | Lint should extend existing lint.rs, not new crate | 0 |
| P06 | 🧁 Scone | Auto-fix for custom colors is unsafe | 0 |
| P07 | 🧁 Eclair | Auto-fix will erase semantic color intent | 0 |
| P08 | 🧁 Eclair | Existing lint infrastructure already exists | 0 |
| P09 | 🧁 Donut | Implementation timing: templates before lint | 0 |
| P10 | 🧁 Donut | count_top_level_nodes is undefined complexity | 0 |
| P11 | 🧁 Cupcake | LR orientation serves legitimate horizontal architectures | 1 |
| P12 | 🧁 Eclair | lint.rs extension needs Mermaid block extraction | 1 |
## Tensions Tracker — FINAL
| ID | Tension | Status | Resolution |
|----|---------|--------|------------|
| T01 | Auto-fix scope | **RESOLVED** | Theme prepend: auto-fix. Colors: error + manual migration |
| T02 | Shape semantics conflicts | **RESOLVED** | Advisory for new diagrams, legacy exempt |
| T03 | LR viewport assumptions | **RESOLVED** | Subsumed by T07 |
| T04 | Hexagon notation conflict | **RESOLVED** | Advisory status removes conflict |
| T05 | Shape/emoji precedence | **RESOLVED** | Subsumed by T08 |
| T06 | Lint infrastructure location | **RESOLVED** | Extend `crates/blue-mcp/src/handlers/lint.rs` |
| T07 | Node counting specification | **RESOLVED** | Count leaf nodes (terminal visual elements) |
| T08 | Emoji color injection | **RESOLVED** | Plain text for architecture; emoji for annotations |
| T09 | Implementation timing | **RESOLVED** | Parallel track with warning-only lint |
| T10 | Edge label limits | **RESOLVED** | Advisory at 15 chars, not prescriptive |
---
## Round 0: Opening Arguments
### 🧁 Muffin
[PERSPECTIVE P01: Node counting heuristic fragility]
The lint rule proposes counting "top-level nodes" to trigger warnings on LR diagrams with >3 nodes, but the RFC doesn't specify how to handle subgraphs with nested nodes or how to distinguish layout-relevant nodes from connection points.
[PERSPECTIVE P02: Premature lint crate assumption]
The RFC specifies implementation in a `blue_lint` crate that doesn't exist in the current codebase.
[TENSION T01: Auto-fix scope ambiguity]
Unclear whether auto-fix should strip prohibited `fill:#` directives entirely or just flag them.
### 🧁 Cupcake
[PERSPECTIVE P03: Emoji subgraph labels create platform-dependent rendering risks]
Emojis render inconsistently across Mermaid versions, GitHub vs VS Code vs offline viewers. The RFC prohibits custom fills but doesn't address emoji color injection.
[PERSPECTIVE P04: 15-char edge label limit needs exception framework]
No guidance for when technical precision demands more characters.
[TENSION T02: Shape semantics standardization conflicts with existing Blue document patterns]
### 🧁 Scone
[PERSPECTIVE P05: Lint implementation belongs in existing lint handler]
`crates/blue-mcp/src/handlers/lint.rs` already implements RFC header linting. Creating a separate crate introduces unnecessary overhead.
[PERSPECTIVE P06: Auto-fix for custom colors is unsafe without semantic preservation]
Custom `fill:#` colors encode semantic intent. Auto-stripping loses author intent.
[TENSION T03: LR-versus-TB rule assumes viewport constraints that may not hold]
### 🧁 Eclair
[PERSPECTIVE P07: Auto-fix will erase semantic color intent]
In the wip spike, colors distinguish deployment environments that neutral grayscale won't preserve.
[PERSPECTIVE P08: Existing lint infrastructure already exists]
The `blue_lint` handler already detects RFC docs and runs header format checks.
[TENSION T04: Shape semantics table conflicts with existing hexagon usage]
### 🧁 Donut
[PERSPECTIVE P09: lint enforcement timing is backwards]
Templates should generate compliant output first, then lint catches legacy violations.
[PERSPECTIVE P10: count_top_level_nodes is undefined complexity]
Node counting in Mermaid is non-trivial due to subgraphs and multi-line definitions.
[TENSION T05: shape semantics conflict with emoji convention]
---
## 💙 Judge: Round 0 Synthesis
**Converged**: Neutral theme correct. Auto-fix for theme safe. Auto-fix for colors unsafe. Extend lint.rs.
**Open**: Shape semantics, emoji injection, LR counting, edge labels, timing.
**Velocity**: 55 → Round 1
---
## Round 1: Consensus Building
### 🧁 Muffin
- [RESOLVED T06]: Extend existing lint.rs
- [RESOLVED T01]: Auto-fix for theme only; error for colors
- [REFINEMENT T07]: Container vs leaf counting needs spec
- [CONCESSION]: Shape semantics need migration audit
### 🧁 Cupcake
- [RESOLVED T06, T01]
- [PERSPECTIVE P11]: LR orientation serves legitimate horizontal architectures
- [REFINEMENT]: Emoji exception framework needed
- [CONCESSION]: Shape semantics need gradual adoption
### 🧁 Scone
- [RESOLVED T06, T01]
- [CONCESSION T03]: Subsumed by T07 (node counting is real issue)
- [REFINEMENT]: Leaf node counting specification
### 🧁 Eclair
- [RESOLVED T06, T01]
- [PERSPECTIVE P12]: lint.rs extension needs Mermaid block extraction
- [CONCESSION]: Hexagon less critical than emoji-shape precedence
### 🧁 Donut
- [RESOLVED T06, T01]
- [CONCESSION T05]: Subsumed by T08 (emoji injection is deeper)
- [REFINEMENT T09]: Parallel track may work
---
## 💙 Judge: Round 1 Synthesis
**Resolved**: T01, T03, T05, T06 (5 of 10)
**Near-resolved**: T07 (leaf vs container), T09 (parallel track)
**Advisory path**: T02, T04 (shape semantics)
**Open**: T08 (emoji), T10 (edge labels)
**Velocity**: 104 (+49)
---
## Round 2: Full Convergence
### 🧁 Muffin
- [RESOLVED T07]: Count leaf nodes—Scone's approach yields predictable results
- [RESOLVED T08]: Plain text for architecture diagrams
- [RESOLVED T09]: Parallel track with flag-only mode
- [RESOLVED T10]: Edge labels advisory at 15 chars
- [RESOLVED T02, T04]: Shape semantics advisory for new diagrams
### 🧁 Cupcake
- [RESOLVED T07]: Leaf nodes provide predictable lint behavior
- [RESOLVED T08]: Emoji prohibited in architecture diagrams
- [RESOLVED T09]: Parallel implementation acceptable
- [RESOLVED T10]: Edge label limit advisory only
- [RESOLVED T02, T04]: Advisory for new diagrams with legacy exemption
### 🧁 Scone
- [RESOLVED T07]: Leaf node counting is implementation-testable
- [RESOLVED T08]: Plain text labels for architecture clarity
- [RESOLVED T09]: Parallel track with flag-only mode
- [RESOLVED T10]: Edge labels advisory with soft limit
- [RESOLVED T02, T04]: Shape semantics advisory, no forced migration
### 🧁 Eclair
- [RESOLVED T07]: Leaf node counting
- [RESOLVED T08]: Prohibit emoji in architecture labels, allow in annotations
- [RESOLVED T09]: Parallel implementation viable
- [RESOLVED T10]: Edge label limits advisory
- [RESOLVED T02, T04]: Advisory stance removes conflicts
### 🧁 Donut
- [RESOLVED T07]: Leaf nodes—containers are organizational, not cognitive load
- [RESOLVED T08]: Plain text for neutral theme consistency
- [RESOLVED T09]: Parallel track confirmed viable
- [RESOLVED T10]: Advisory with "consider abbreviating" warning
- [RESOLVED T02, T04]: Advisory status resolves all shape conflicts
---
## 💙 Judge: Convergence Declaration
**STATUS: CONVERGED**
All 10 tensions resolved by unanimous consensus across 5 experts in 3 rounds.
### Final Resolutions for RFC 0043 Amendment
| Category | Resolution |
|----------|------------|
| **Theme** | `%%{init: {'theme': 'neutral'}}%%` REQUIRED |
| **Lint location** | Extend `crates/blue-mcp/src/handlers/lint.rs` |
| **Auto-fix scope** | Theme prepend: auto-fix. Colors: error + manual migration |
| **Node counting** | Count leaf nodes (terminal visual elements), not containers |
| **LR threshold** | Advisory warning at >3 leaf nodes |
| **Emoji guidance** | Plain text for architecture diagrams; emoji for annotations only |
| **Shape semantics** | Advisory for new diagrams; legacy exempt |
| **Edge labels** | Advisory 15-char limit, not prescriptive |
| **Implementation** | Parallel track: templates + lint with warning-only mode |
### RFC Amendments Required
1. Replace "blue_lint crate" with "extend lint.rs handler"
2. Split auto-fix: theme=auto, colors=error
3. Add leaf node counting specification
4. Make shape semantics table "Recommended Patterns"
5. Add emoji guidance section (plain text for architecture)
6. Make edge label limit advisory
7. Reorder tasks: parallel track acceptable
---
*Dialogue concluded 2026-01-30. ALIGNMENT achieved through 3 rounds of deliberation.*