Skip to content

feat(seaborn): implement waffle-basic#9948

Open
github-actions[bot] wants to merge 4 commits into
mainfrom
implementation/waffle-basic/seaborn
Open

feat(seaborn): implement waffle-basic#9948
github-actions[bot] wants to merge 4 commits into
mainfrom
implementation/waffle-basic/seaborn

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Implementation: waffle-basic - python/seaborn

Implements the python/seaborn version of waffle-basic.

File: plots/waffle-basic/implementations/python/seaborn.py

Parent Issue: #998


🤖 impl-generate workflow

github-actions Bot added 2 commits July 26, 2026 10:23
Regen from quality 85. Addressed:
- Canvas contract violation: previous figsize=(16,16) with no explicit
  creation dpi + bbox_inches="tight" (forbidden by the seaborn library
  prompt) drifted off the 2400x2400 square target. Switched to
  figsize=(6,6), dpi=400, manual axes placement (fig.add_axes) instead
  of tight_layout/bbox_inches="tight" so the canvas lands exactly on
  2400x2400.
- Change request: household-budget domain matched plotnine's example
  almost exactly (Housing/Food/Transport). Replaced with a customer
  satisfaction survey (Very Satisfied ... Very Dissatisfied), matching
  the spec's "survey results and polling data" application.
- DE-01/DE-02 (aesthetic sophistication / visual refinement): removed
  all four spines via sns.despine for a clean floating grid, added a
  caption spelling out the waffle-chart metaphor.
- LM-02 (distinctive seaborn features): themed via sns.set_theme(rc=...)
  per the library prompt's theme-adaptive chrome mapping instead of
  manual axes styling.
- Corrected stale "okabe_ito" variable naming — the palette was already
  Imprint, not Okabe-Ito; renamed to IMPRINT_PALETTE.

Kept: 10x10 grid construction, Imprint palette with brand green first,
theme-adaptive chrome, legend with category + percentage labels.
@claude

claude Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 1/3

Image Description

Light render (plot-light.png): Warm off-white (#FAF8F1) background. Bold dark title "waffle-basic · seaborn · anyplot.ai" at top, with a muted-gray caption "Each square = 1% of 500 survey respondents" beneath it. A 10×10 grid of colored squares (no axes/spines) represents the waffle chart, with thin off-white gutters between squares. A two-row legend below lists each category with its percentage. All text is dark ink on the light surface and clearly readable.

Dark render (plot-dark.png): Warm near-black (#1A1A17) background. The same title and caption now render in light ink, fully legible. The legend text is also light-colored and readable. The five data colors (brand green, lavender, blue, ochre, matte red) are pixel-identical to the light render — only the chrome flipped as expected.

Both renders pass the theme-readability check: no dark-on-dark or light-on-light failures in either image.

Score: 89/100

Category Score Max
Visual Quality 29 30
Design Excellence 15 20
Spec Compliance 13 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 89 100

Visual Quality (29/30)

  • VQ-01: Text Legibility (7/8)
  • VQ-02: No Overlap (6/6)
  • VQ-03: Element Visibility (6/6)
  • VQ-04: Color Accessibility (2/2)
  • VQ-05: Layout & Canvas (4/4)
  • VQ-06: Axis Labels & Title (2/2)
  • VQ-07: Palette Compliance (2/2)

Design Excellence (15/20)

  • DE-01: Aesthetic Sophistication (6/8) - Custom palette and deliberate typography hierarchy, clearly above defaults but not fully publication-grade
  • DE-02: Visual Refinement (5/6) - All spines removed, floating-grid gutters, generous whitespace, frameless legend
  • DE-03: Data Storytelling (4/6) - Bottom-up "filling a glass" fill order anchors the dominant category and creates hierarchy, but no explicit callout

Spec Compliance (13/15)

  • SC-01: Plot Type (5/5)
  • SC-02: Required Features (4/4)
  • SC-03: Data Mapping (3/3)
  • SC-04: Title & Legend (1/3) - Title is missing the mandated language segment

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6)
  • DQ-02: Realistic Context (5/5)
  • DQ-03: Appropriate Scale (4/4)

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3)
  • CQ-02: Reproducibility (2/2)
  • CQ-03: Clean Imports (2/2)
  • CQ-04: Code Elegance (2/2)
  • CQ-05: Output & API (1/1)

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5)
  • LM-02: Distinctive Features (3/5) - Repurposing sns.heatmap for a waffle grid is clever but the underlying primitive is generic

Score Caps Applied

  • None

Strengths

  • Clever repurposing of sns.heatmap with a ListedColormap and manual grid construction to render a native seaborn waffle chart, since the library has no dedicated waffle function
  • Floating-grid effect (linecolor=PAGE_BG, linewidths=2.5) with all spines removed gives clean square separation without a heavy frame
  • Deliberate bottom-to-top "filling a glass" fill order anchors the dominant category (Very Satisfied, 42%) at the base, giving the grid a visual hierarchy beyond a flat category dump
  • Correct Imprint categorical palette in canonical order with brand green #009E73 first, identical across both theme renders
  • Theme-adaptive chrome is fully correct in both renders — no dark-on-dark or light-on-light failures
  • Legend cleanly lists each category with its percentage, satisfying the spec's requirement

Weaknesses

  • Title omits the mandated language segment: it renders waffle-basic · seaborn · anyplot.ai but the required format is {spec-id} · {language} · {library} · anyplot.ai — should read waffle-basic · python · seaborn · anyplot.ai
  • Design Excellence is solid but fairly minimal (flat color blocks, no secondary emphasis on the largest segment) — stops short of publication-grade polish
  • Library Mastery is only moderate: sns.heatmap is a workaround for a chart type seaborn doesn't natively support — a smart trick, but still a generic underlying primitive

Issues Found

  1. SC-04 HIGH: Title string is missing the required python language segment
    • Fix: change the fig.text(...) title literal from "waffle-basic · seaborn · anyplot.ai" to "waffle-basic · python · seaborn · anyplot.ai"
  2. DE-01/DE-03 LOW: Composition is clean but minimal — no secondary emphasis calling out the dominant or extreme categories
    • Fix: consider a subtle emphasis technique (e.g. a slightly bolder outline or callout on the largest/smallest segment) to sharpen the storytelling, while keeping the design restrained

AI Feedback for Next Attempt

Fix the title first — it's currently missing the mandated python language segment between the spec-id and the library name. Everything else about this implementation is strong: keep the Imprint palette usage, the floating-grid styling, and the bottom-up fill order. If you want to push Design Excellence and Data Storytelling further, consider a subtle secondary emphasis on the dominant or extreme category (e.g., a slightly heavier outline) without adding clutter.

Verdict: REJECTED

@github-actions github-actions Bot added quality:89 Quality score 89/100 ai-rejected Quality not OK, triggers update labels Jul 26, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Jul 26, 2026
Attempt 1/4 - fixes based on AI review
@github-actions

Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 1/4

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@github-actions

Copy link
Copy Markdown
Contributor Author

🔧 AI Review Produced No Score — Auto-Retrying

The Claude Code Action ran but didn't write quality_score.txt. Auto-retrying review once...


🤖 impl-review

@github-actions github-actions Bot added the ai-review-failed AI review action failed or timed out label Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

❌ AI Review Failed (auto-retry exhausted)

The AI review action completed but did not produce valid output files. Auto-retry already tried once.

What happened:

  • The Claude Code Action ran
  • No quality_score.txt file was created

Manual rerun:

gh workflow run impl-review.yml -f pr_number=9948

🤖 impl-review

@github-actions github-actions Bot added ai-review-rescued Review re-dispatched once after ai-review-failed ai-review-failed AI review action failed or timed out and removed ai-review-failed AI review action failed or timed out labels Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

❌ AI Review Failed (auto-retry exhausted)

The AI review action completed but did not produce valid output files. Auto-retry already tried once.

What happened:

  • The Claude Code Action ran
  • No quality_score.txt file was created

Manual rerun:

gh workflow run impl-review.yml -f pr_number=9948

🤖 impl-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-attempt-1 First repair attempt ai-review-failed AI review action failed or timed out ai-review-rescued Review re-dispatched once after ai-review-failed quality:89 Quality score 89/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants