Repository navigation
feat(review): per-mark label density rule in the shared style guide - #12189
Merged
Merged
Conversation
The per-mark label rule #12184 gave the agent adapter now lives once in prompts/default-style-guide.md ("Per-mark Labels and Decorations"), with a proportional VQ-03 paragraph in quality-criteria.md and a 5d bullet in ai-quality-review.md, so the catalogue pipeline applies it too. The adapter prompt points at the shared rule instead of carrying a copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The required baseline-versus-candidate review retest remains pending, leaving catalogue scoring regressions unverified.
0 open findings
What changed in this PR
Centralizes per-mark label density guidance so the catalogue pipeline and agent adapter share the same rule.
Changes:
- Adds shared guidance and proportional scoring deductions for crowded labels and decorations.
- Replaces duplicated adapter guidance with a reference to the shared rule.
- Adds a prompt consistency test and updates documentation.
| File | Description |
|---|---|
tests/unit/agents/runtime/test_density_locale_gates.py |
Checks shared guidance appears once in adapter instructions. |
prompts/workflow-prompts/ai-quality-review.md |
Adds the label-density review check. |
prompts/quality-criteria.md |
Defines proportional deductions for crowding. |
prompts/default-style-guide.md |
Establishes the shared per-mark density rule. |
docs/concepts/agent-network.md |
Documents the shared rule’s source. |
changelog.d/style-guide-label-density.md |
Records the rubric and adapter changes. |
agents/anyplot/prompts/adapter.md |
References shared guidance instead of duplicating it. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prompts/default-style-guide.md("Per-mark Labels and Decorations"), so the catalogue pipeline applies it too.prompts/quality-criteria.mdVQ-03 gains a "Per-mark labels and decorations count as elements" paragraph (deduct VQ-03 in proportion to how much of the plot they bury, VQ-02 where they overlap; labels that fit, or a few labelled extremes, are no deduction), and the 5d proportional sizing check ofai-quality-review.mdgets a matching bullet. No new hard threshold: "about 25 marks" is a heuristic like the data-density heuristic's "< 50 points"; the agent's G11 gate keeps its own measured thresholds in code.agents/anyplot/prompts/adapter.mdkeeps its agent-specific framing ("the same style" covers fixed-count elements) and points at the shared rule instead of repeating it; the adapter reads the style guide and the VQ-03 rubric verbatim. The scorer's and reviewer's narrowed house-style exemption stays as is (it is the agent-only exception, not the rule). A unit test holds that the "about 25 marks" wording appears once in the adapter's instruction.docs/concepts/agent-network.mdnames the new source.Review retest
The last all-Opus set v1 arm (37233543394, rules
c64630aa7) predates the claude-code-action pin bump (#11975/#12099) and the rubric change of #12102, so a fresh baseline was run onmain's rules (e2a63d6, run 38702205512). To keep the spend near one core arm, both arms ran the 15 fresh core items plusf-bar-stacked-labeled-d3andf-heatmap-basic-seaborn(labelled plots, as false-alarm probes), 3 runs each, all onclaude-opus-5-5, without the bubble regen pairs, which carry no per-mark labels.Review retest — set v1 f-bubble-basic-ggplot2,f-area-elevation-profile-seaborn,f-bar-horizontal-makie,f-bode-basic-altair,f-bar-diverging-plotnine,f-pie-basic-highcharts,f-bar-pareto-letsplot,f-waterfall-basic-muix,f-line-win-probability-chartjs,f-bubble-basic-d3,f-network-basic-bokeh,f-bar-diverging-likert-matplotlib,f-acf-pacf-plotly,f-line-stock-comparison-pygal,f-gantt-basic-echarts,f-bar-stacked-labeled-d3,f-heatmap-basic-seaborn (17 fresh × 3)
Fresh: claude-opus-5-5 · rules e2a63d6 → 35caaaf · harness v1
run · set v1 lock sha256 a6831a315a11
Reading. Neutral, as intended for a set with no crowded labels. No candidate weakness cites per-mark label density; the labelled plots (
f-bar-stacked-labeled-d3,f-bar-horizontal-makievalue labels,f-bar-diverging-plotninevalue labels,f-heatmap-basic-seaborncell text) keep their VQ-03 scores (6/6/6, 6/6/6, 6/6/6, 5–6). VQ-03's mean stays at 5.4. VQ-03's within-item SD (0.31 → 0.46) moves onf-bode-basic-altair(one 4) andf-line-stock-comparison-pygal(4 to 6), whose VQ-03 comments name a bright dark-theme grid, thin lines and small legend swatches, not labels. The one false alarm isf-bubble-basic-ggplot2A1, run 1: an SC-01 line about the off-spec top-3 callout layer says the callouts "sit on top of the dense bubble clusters", which the probe's overlap regex catches; it is not a per-mark label deduction. The set has no crowded-label item, so the retest shows that the rule does not take points from plots that pass it, but it cannot measure detection. G11's fixtures in #12184 cover the crowded case on the agent side.Plan
N/A
Test plan
uv run pytest tests/unit -n 4(11,037 passed)ruff check,ruff format --check,tools.changelog check --base origin/main