with one click
webstatus-search-grammar
// Use when modifying the ANTLR search grammar, adding new search terms, or working with the query parser and builder.
// Use when modifying the ANTLR search grammar, adding new search terms, or working with the query parser and builder.
Use when creating or modifying Go backend API endpoints, modifying Spanner database schemas, or working with OpenAPI and Spanner mappers.
Use when working with the webstatus notification pipeline, event producer, push delivery, or push workers (e.g., Email, Webhooks), and Pub/Sub subscribers.
Use when writing, modifying, or debugging Playwright end-to-end (E2E) tests for webstatus.dev.
Use when modifying the frontend SPA, working with TypeScript, Lit web components, Shoelace components, or frontend tests.
Use when working on Go data ingestion workflows, scheduled Cloud Run jobs, or adding new scrapers for BCD, WPT, or other data sources.
Use when upgrading toolchain versions (Go, Node.js, Terraform, Playwright) or updating the DevContainer and Github CI configurations.
| name | webstatus-search-grammar |
| description | Use when modifying the ANTLR search grammar, adding new search terms, or working with the query parser and builder. |
This skill provides instructions for modifying the feature search syntax in webstatus.dev, which is built on ANTLR v4.
For a technical breakdown of the ANTLR grammar, search node transformation, and the FeaturesSearchVisitor implementation, see references/architecture.md.
antlr/FeatureSearch.g4.lib/gen/featuresearch/parser/ directly.is:discouraged)antlr/FeatureSearch.g4):
search_criteria rule in the grammar file (e.g., add | discouraged_term).discouraged_term: 'is' ':' 'discouraged';.make antlr-gen. This will update the files in lib/gen/featuresearch/parser/. Note: If you do not have the devcontainer open or do not have the right Java dependency versions, ask the user to run this step for you.lib/gcpspanner/searchtypes/):
SearchIdentifier for your term in searchtypes.go (e.g., IdentifierIsDiscouraged).VisitDiscouraged_termContext method. This visitor is the source-of-truth for how grammar terms are translated into Spanner SQL.lib/gcpspanner/feature_search_query.go):
FeatureSearchFilterBuilder.traverseAndGenerateFilters, add a case for your new SearchIdentifier.WHERE clause for the filter.lib/gcpspanner/searchtypes/features_search_parse_test.go.lib/gcpspanner/feature_search_query_test.go.lib/gcpspanner/feature_search_test.go.frontend/src/static/js/utils/constants.ts to make it discoverable to users.When you add a new search grammar term or modify parsing:
GEMINI.md to ensure I am aware of the changes.docs/ARCHITECTURE.md is updated if there are broader system impacts.saved: references via expandSavedSearches, unexpected edge cases (e.g. backendtypes.ErrSavedSearchNotFound, or cyclic references) MUST NOT crash the request and MUST NOT return 500 Internal Server Error.get_features.go, create_saved_search.go) MUST explicitly catch these semantic validation errors and map them to HTTP 400 Bad Request JSON responses. The frontend relies on these 400s to render in-app warning banners for invalid subsets of an otherwise valid query string.ValidateQueryReferences (or equivalent dry-run query validators) intercepts invalid cycles or missing queries before a database mutation is committed.