docs(cartography): trim both cartography references, lift family principle, restore safety nets#35
Merged
Merged
Conversation
… principle, remove palette reflex - Hoist the cartographic-doctrine principle (match palette family to measure character) into §0 — sequential/diverging/qualitative tied to data shape, sourced from Brewer/MacEachren. - Strip named palettes (Sunset, Teal, etc.) from recipes and workflows; recipes now use placeholders that point back at §6 so the agent picks by character, not by reflex. - Expand §6 with the full CARTO palette registry per family and a colorblind-safe subset. Note that custom RGBA arrays are equally valid. - Add §3.1 "Opacity as a design lever" — three jobs (basemap breathing, hierarchy, density reveal), typical range 0.4–0.8, fit to layer role. - Soften "string columns sequential" rule: default qualitative, deviate when strings carry inherent order. - Reframe drawing-order rule (§2) as coverage/occlusion, not size. - Refresh anti-patterns (§9) with palette-reflex and contrasting-stroke-on-dense-choropleths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ng principle, remove palette reflex - Hoist the cartographic principle (match palette family to measure character) into §4 — sequential/diverging/qualitative tied to data shape, sourced from Brewer/MacEachren. Crossing families misrepresents the data. - Strip troubleshooting prose: drop §4.5a NULL-ratio post-mortem, rooftop-PV failure narrative, ENERGY STAR worked example, and the "why agents over-use quantile" meta. Keep the rules, drop the war stories. - Demote Sunset/SunsetDark: remove from §4.4 "good on dark" default list and §4.2a thermal branches; keep in §4.1 registry. Restrict to literal thermal data via the palette-reflex anti-pattern (§7.10). - Soften "string columns sequential/diverging": default qualitative; sequential is correct when strings carry inherent order (sentiment, grades). - Reframe drawing-order rule (§1.8) as coverage/occlusion, not "bigger features go to the bottom". Add a "Why this position" column per row. - Add opacity-as-design-lever framing: three jobs (basemap breathing, hierarchy, density reveal), typical range 0.4–0.8, fit to layer role. Soften the per-layer specifics in §1.1/§1.3/§1.6. - Collapse anti-patterns §7.10–7.13 to short indices pointing back to main sections. Worked recipes (§8) reduced to three archetypal patterns. Net: 1049 → 678 lines (-35%), 12.8k → ~6.4k words (-50%). Validation: make validate OK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… 0.7 opacity anchor, simplify string-column rule The first trim commit removed too many guardrails — fine for strong-reasoning agents but a regression for the median case. This commit restores three safety nets without reintroducing the original Sunset-reflex problem they were meant to prevent. Both cartography files (carto-create-builder-maps + carto-render-inline-map): 1. **Default-per-family palette table.** §4.2 / §6 now end with a small "default if uncertain" table: - Sequential → Teal - Diverging → Temps / Geyser - Qualitative 2–6 cats → Bold (Safe for colorblind) - Qualitative 7–12 cats → Prism / Pastel These are colorblind-safe, basemap-neutral defaults — explicitly framed as a *fallback when reasoning gives no preference*, not a reflex. The principle still leads: pick by character first; the defaults catch the no-context case so the agent never picks Sunset because the doc named it. 2. **Opacity anchored at 0.7.** §1.4 / §3.1 keep the three-job design-lever framing but lead with "Default to 0.7 when you have no specific reason to deviate". The 0.4–0.8 range remains for agents that have a reason. Per-layer numbers stay as starting points; 0.7 is the no-context fallback. 3. **String-column rule simplified.** §7.8 / §9 collapse from "default qualitative; exception when strings carry order; lock via colorDomain" to "string columns → qualitative palette". The rare ordered-strings case (sentiment, grades) lives in §3.5 of the create-builder-maps doc as an escape hatch; not surfaced in the anti-pattern. 4. **Checklist entries refreshed.** "If uncertain on palette: Teal/Temps/Geyser/Bold/Safe — see §4.2 defaults" added to both checklists so the safety net is reachable from the final-gate step. Net for the median agent: working map even without strong cartographic reasoning. Net for the strong agent: principle still leads, defaults framed as fallback. No Sunset / SunsetDark reintroduction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ol (cloud-native#24623)
PR cloud-native#24623 replaces get_column_stats + list_resources with a unified `describe` tool — one entry-point, two-step flow (schema first, then stats per column). This commit updates the render-inline-map cartography reference to match the new tool surface so the skill and prompt stay in lockstep when #24623 merges.
Changes:
- §0 "Before you pick anything" — replace the two-row table with the describe two-step flow. Add schema response shape ({ source, schema, geomField?, geometryType?, rowCount? }), note geomField as the column NOT to style by, and document the discriminated stats response (type: 'Number' | 'String' | 'Boolean' | 'Timestamp' | 'Geometry').
- Add explicit fallback note: schema mode fails for analytical queries / spatial-index tables / tilesets / rasters → list_resources. Stats mode works on h3/quadbin via spatial_data_type.
- Document the synthetic `_carto_point_density` column on Point sources — server-side per-tile point count, valid as `attr` for colorBins / colorContinuous, NOT queryable via SQL.
- §5 colorBins workflow and helper note — describe replaces get_column_stats.
- §9 anti-pattern — describe replaces get_column_stats.
- §10.1 / §10.2 recipes — describe replaces get_column_stats, response examples include the discriminated `type` field.
- Checklist — describe + list_resources fallback documented.
No cartographic doctrine changed; this is purely a tool-name and response-shape alignment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
anamanvil
marked this pull request as ready for review
May 29, 2026 17:31
# Conflicts: # skills/carto-create-builder-maps/references/cartography.md # skills/carto-render-inline-map/references/cartography.md
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
Trims and reorganises both
cartography.mdreferences (one per skill) to address two concrete behaviours we were seeing in agent-generated maps:Sunset/SunsetDarkon data that wasn't thermal/severity, because the docs recommended them by name in multiple tables.The fix leans on established cartographic doctrine (Brewer / ColorBrewer / MacEachren — match palette family to measure character) rather than naming specific palettes by reflex.
Three commits on this branch
5cdcf85—carto-render-inline-map/cartography.mdtrim (426 → 441 lines)d94a69c—carto-create-builder-maps/cartography.mdtrim (1049 → 678 lines)Sunset/SunsetDarkfrom the §4.4 dark-basemap default list and §4.2a thermal branches; kept in the §4.1 registry.Net: ~-35% line, ~-50% word reduction. Lost no Tier-1 capability content.
f874f2c— restore safety netsHonest review after the first two commits found regression risk for the median-reasoning agent (placeholders without a working example, opacity range without an anchor, string-column rule too nuanced). This commit restores three guardrails without reintroducing the original Sunset reflex:
Teal(sequential),Temps/Geyser(diverging),Bold/Safe(qualitative),Prism/Pastel(7–12 cats). Framed explicitly as fallback when reasoning gives no preference, not a reflex.0.7— the no-context default. The0.4–0.8design-lever range remains for agents that have a reason.Companion PR
CartoDB/cloud-native#24630updates theview-mapMCP prompt to align with the new skill structure — concrete palette examples (Teal / BluYl / Bold) with inline family-matching rationale, names varied across recipes to avoid a new reflex.Validation
make validateclean (23 skills, 236 snippets, 31 untagged skipped) after each commit.SKILL.mdchanges; no frontmatter changes; no plugin manifest changes — pure prose refactor of two reference files.Review focus