feat: add @deck.gl-community/ai-skills — AI agent helpers for deck.gl#551
Closed
charlieforward9 wants to merge 4 commits intomasterfrom
Closed
feat: add @deck.gl-community/ai-skills — AI agent helpers for deck.gl#551charlieforward9 wants to merge 4 commits intomasterfrom
charlieforward9 wants to merge 4 commits intomasterfrom
Conversation
…-geographic editing Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
…ORDINATE_SYSTEM constants Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
Adds a new module that handles both approaches discussed in #534: - Pattern A (native TypeScript): typed factory functions for all common layer types with sensible defaults, backed by llms.txt reference docs for LLM code generation (addresses akre54's docs-first feedback) - Pattern B (JSON descriptors): fully serializable layer configs with dot-path accessors, validateDescriptor, and hydrateDescriptor for low-code UIs and server-side LLM output (the noodle approach) Also includes DeckBuilder fluent compositor, viewport helpers (fitViewport, getBoundingBox), and a comprehensive llms.txt that serves as the single agent-facing reference for both patterns. 14/14 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
|
Closing in favour of #552 — this branch was accidentally based on a Copilot branch and included unrelated editable-layers changes. |
4 tasks
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
This PR adds a new
@deck.gl-community/ai-skillsmodule, picking up the thread from #534 and the discussion with @ibgreen and @akre54.The module takes the position that both approaches are correct — for different jobs — and ships them together with a single
llms.txtthat makes the distinction clear:Pattern A — native TypeScript (for LLM code generation): typed factory functions (
scatterplotLayer,arcLayer, etc.) returning correct props with sensible defaults, backed by a comprehensivellms.txtreference. This directly addresses @akre54's point that "agentic coding tools work best when they can read clean documentation and write native code directly."Pattern B — JSON descriptors (for serializable configs and low-code UIs): fully JSON-serializable layer descriptors with dot-path accessor strings,
validateDescriptor, andhydrateDescriptor. This preserves the noodle/IR approach from feat: add @deck.gl-community/visgl-skills — AI agent skills for deck.gl #534 for the cases where it genuinely shines — low-code builders, saved dashboards, server-side LLM output that can't execute code.What's included
src/layer-factories.tssrc/layer-descriptors.tscreateDescriptor/validateDescriptor/hydrateDescriptorwith dot-path resolutionsrc/deck-builder.tsDeckBuildercomposing layers + view state into a serializableDeckConfigsrc/viewport-skills.tsfitViewport,getBoundingBox,createViewStatellms.txtllms.txtis included in the npmfileslist so it ships with the package and is accessible atnode_modules/@deck.gl-community/ai-skills/llms.txt.On the Zod direction
The
validateDescriptorfunction is a natural slot for Zod schemas — if @ibgreen shares more on the Zod layer schema direction, it would slot in cleanly here without breaking the existing API.Test plan
yarn test)Closes #534 (supersedes the Copilot-generated PR with a more considered design)
🤖 Generated with Claude Code