Add agent skills + fix missed Spark writeFormat impl#11
Merged
Conversation
Three new project-local skills under .claude/skills/, each authored against the existing skill-authoring conventions and passing the lint script: - add-cel-function: walks adding a new CEL function to all 6 dialects (constant + dispatch + Dialect interface method + 6 impls + tests). Includes references/sql-writer-pattern.md and references/conversion-exception.md. - add-sql-dialect: walks adding a new SQL dialect (e.g. CockroachDB, Snowflake). Includes a scaffold_dialect.sh script that copies an existing dialect package and renames classes via sed, plus references/ dialect-method-checklist.md and references/test-files.md. - port-from-upstream: walks porting from the Go upstream cel2sql repo. Includes a list_upstream_changes.sh script that auto-detects the last port commit on cel2sql4j and lists candidate upstream commits, plus references/go-to-java-idioms.md and references/two-pr-shape.md. Also includes the previously-uncommitted skill-authoring skill that was staged on main (the foundation these new skills are authored against). While running the build-verification step on this PR, discovered that SparkDialect (PR #10) was merged on top of PR #9 without rebasing and silently lost the writeFormat method that PR #9 added to the Dialect interface — main currently does not compile. Fixed in this PR by adding SparkDialect.writeFormat using Spark's format_string() function (its printf-equivalent), and added a Spark case to Cel2SqlOptionsTest's formatTests. All 392 unit tests pass; ./gradlew build clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Adds three repo-local agent skills that codify the multi-file workflows we've been hand-cranking on every recent feature. Authored against the existing
skill-authoringskill (also committed here — it had been staged on main but never committed) and lint-clean.Skills
add-cel-functiontrim,format,getMonth, etc.) — touchesConverterconstants/dispatch,Dialectinterface, all 6 dialect impls, tests.add-sql-dialectport-from-upstreamgithub.com/spandigital/cel2sql— script that auto-detects the last port commit and lists candidates, Go-to-Java idiom mapping, two-PR shape guidance.Each SKILL.md is well under the 200-line target (88 / 113 / 94) and passes
python3 .claude/skills/skill-authoring/scripts/lint_skill.pywith no errors or warnings. Two helper scripts ship alongside:add-sql-dialect/scripts/scaffold_dialect.sh <template> <new-name> <NewClassPrefix>— copies an existing dialect package and renames viased. Safe by default (refuses to overwrite, validates template exists, derives repo root by walking up).port-from-upstream/scripts/list_upstream_changes.sh [<since-sha>]— lists upstream tags + commits, auto-detecting the last port via the cel2sql4j commit log.Bug fix discovered while validating
Building the skills branch surfaced a real bug on
main: PR #10 (Spark dialect) merged on top of PR #9 without rebasing, soSparkDialectis missing thewriteFormatmethod that PR #9 added to theDialectinterface.maincurrently doesn't compile. This PR adds the missing method using Spark'sformat_string()(its printf-equivalent: supports%s/%d/%fdirectly, like SQLite/DuckDB) and adds a Spark case toCel2SqlOptionsTest.formatTests.This is a minor scope expansion but the right call — the skills PR can't pass CI on a broken
maineither, and the fix is tiny.Test plan
./gradlew test)./gradlew buildcleanlint_skill.pyexits 0)scaffold_dialect.shsmoke-tested (refuses to run without args, errors clearly on missing template)list_upstream_changes.shsmoke-tested (auto-detectsef505abfrom PR Add Apache Spark SQL dialect #10's commit message; lists candidate commits since)🤖 Generated with Claude Code