-
Notifications
You must be signed in to change notification settings - Fork 847
Added tinkerpop-dev skills based on Agent Skills standard #3380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
spmallette
wants to merge
2
commits into
master
Choose a base branch
from
agent-skills
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| --- | ||
| name: tinkerpop-dev | ||
| description: > | ||
| Development guidance for the Apache TinkerPop monorepo. Use when building, | ||
| testing, or contributing to TinkerPop's graph computing framework and its | ||
| multi-language Gremlin ecosystem (Java, Python, JavaScript, .NET, Go). | ||
| Covers coding conventions, build recipes, test evaluation, documentation, | ||
| development environment setup, and Gremlin MCP server usage. | ||
| license: Apache-2.0 | ||
| compatibility: Requires Java 11+, Maven 3.5.3+, Docker. Individual GLVs may need Python, Node.js, .NET SDK, or Go. | ||
| metadata: | ||
| version: 1.0.0 | ||
| project: Apache TinkerPop | ||
| --- | ||
|
|
||
| # TinkerPop Development Skill | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Apache TinkerPop is a graph computing framework providing a standard API (the Gremlin graph | ||
| traversal language) for graph databases and processors. The repository is a Maven multi-module | ||
| monorepo that wraps JVM code, Python, JavaScript/TypeScript, .NET, and Go under a single build. | ||
|
|
||
| Canonical project documentation (prefer local files over external URLs): | ||
|
|
||
| - `README.md` and `CONTRIBUTING.md` at the repo root | ||
| - Reference docs: `docs/src/reference/` | ||
| - Developer docs: `docs/src/dev/developer/` | ||
| - Provider docs and Gremlin Semantics: `docs/src/dev/provider/` | ||
| - IO and Serialization: `docs/src/dev/io/` | ||
| - Recipes: `docs/src/recipes/` | ||
| - Upgrade docs: `docs/src/upgrade/` | ||
| - Future plans: `docs/src/dev/future/` | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| ``` | ||
| tinkerpop/ | ||
| ├── gremlin-core/ Core graph API and traversal engine (Java) | ||
| ├── gremlin-server/ Gremlin Server (Java) | ||
| ├── tinkergraph-gremlin/ In-memory reference graph (Java) | ||
| ├── gremlin-python/ Python GLV | ||
| ├── gremlin-js/ JavaScript/TypeScript workspace root | ||
| │ ├── gremlin-javascript/ JS driver (npm: "gremlin") | ||
| │ ├── gremlin-mcp/ Gremlin MCP server (npm: "gremlin-mcp") | ||
| │ └── gremlint/ Gremlin query formatter (npm: "gremlint") | ||
| ├── gremlin-dotnet/ .NET GLV | ||
| ├── gremlin-go/ Go GLV | ||
| ├── gremlin-test/ Shared test resources and Gherkin features | ||
| ├── gremlin-tools/ Benchmarks, coverage, socket server | ||
| ├── docs/src/ AsciiDoc documentation | ||
| ├── docker/ Docker build scripts and configs | ||
| ├── bin/ Utility scripts | ||
| └── CHANGELOG.asciidoc Changelog | ||
| ``` | ||
|
|
||
| Maven is the build orchestration tool for all modules, including non-JVM ones. | ||
|
|
||
| ## Basic Build Commands | ||
|
|
||
| Build everything: | ||
| ```bash | ||
| mvn clean install | ||
| ``` | ||
|
|
||
| Build a specific module: | ||
| ```bash | ||
| mvn clean install -pl <module-name> | ||
| ``` | ||
|
|
||
| For GLV-specific builds, test execution, and advanced workflows, see the appropriate | ||
| reference file under `references/`. | ||
|
|
||
| ## Coding Conventions | ||
|
|
||
| - All files must include the Apache Software Foundation license header. Canonical text | ||
| is at `bin/asf-license-header.txt`. | ||
| - Do not use import wildcards (e.g., avoid `import org.apache.tinkerpop.gremlin.structure.*`). | ||
| Use explicit imports. | ||
| - Define variables as `final` whenever possible, except for loop variables. | ||
| - Respect existing naming patterns and package organization. | ||
| - Use `@/` path aliases for JavaScript/TypeScript imports where the project uses them. | ||
|
|
||
| ## Test Conventions | ||
|
|
||
| - Prefer SLF4J `Logger` over `System.out.println` or `println` in tests. | ||
| - Use `TestHelper` utilities for temporary directories and file structures instead of | ||
| hard-coding paths. | ||
| - Always close `Graph` instances that are manually constructed in tests. | ||
| - Tests using a `GraphProvider` with `AbstractGremlinTest` should be suffixed `Check`, | ||
| not `Test`. | ||
| - Prefer Hamcrest matchers for boolean assertions (e.g., `assertThat(..., is(true))`) | ||
| instead of manually checking booleans. | ||
| - Gremlin language tests use Gherkin features under: | ||
| `gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/` | ||
| See `docs/src/dev/developer/for-committers.asciidoc` for details. | ||
|
|
||
| ## Documentation Conventions | ||
|
|
||
| - TinkerPop documentation is AsciiDoc-based under `docs/src/`. Do not use Markdown in | ||
| the main docs tree. | ||
| - Place new content in the appropriate book (reference, dev, recipes, etc.). | ||
| - Update the relevant `index.asciidoc` so new content is included in the build. | ||
| - For detailed documentation generation instructions, see `references/documentation.md`. | ||
|
|
||
| ## Changelog, License, and Checks | ||
|
|
||
| When changes affect behavior, APIs, or user-visible features: | ||
|
|
||
| - Add or update entries in `CHANGELOG.asciidoc` in the correct version section. | ||
| - Do not invent new version numbers or release names; follow the existing pattern. | ||
| - Preserve and respect license headers and notices in all files. | ||
| - Avoid adding third-party code or dependencies with incompatible licenses. | ||
|
|
||
| ## Agent Guardrails | ||
|
|
||
| ### Do | ||
|
|
||
| - Make small, focused changes that are easy to review. | ||
| - Run the relevant build and test commands before suggesting a change is complete. | ||
| - Update or add tests when behavior changes. | ||
| - Update documentation and/or changelog when changing public behavior or APIs. | ||
| - Follow existing patterns for code structure, documentation layout, and naming. | ||
| - Point maintainers to relevant documentation or issues when proposing non-trivial changes. | ||
|
|
||
| ### Don't | ||
|
|
||
| - Don't perform large, sweeping refactors unless explicitly requested. | ||
| - Don't change public APIs, configuration formats, or network protocols without explicit | ||
| human approval and an associated design/issue. | ||
| - Don't switch documentation formats (e.g., AsciiDoc to Markdown) in the main docs tree. | ||
| - Don't introduce new external dependencies, modules, or build plugins without an | ||
| associated discussion and issue. | ||
| - Don't invent project policies, version numbers, or release names. | ||
| - Don't remove or weaken tests to "fix" failures; adjust the implementation or test | ||
| data instead. | ||
|
|
||
| If uncertain about the impact of a change, prefer to make a minimal patch, add comments | ||
| for reviewers, and ask for clarification. | ||
|
|
||
| ## When In Doubt | ||
|
|
||
| 1. Check `CONTRIBUTING.md`, developer docs under `docs/src/dev/developer/`, and reference docs. | ||
| 2. Prefer no change over an unsafe or speculative change. | ||
| 3. Surface the question to human maintainers. | ||
|
|
||
| ## Reference Guides | ||
|
|
||
| For deeper, task-specific guidance, see the reference files in this skill: | ||
|
|
||
| - [Development Environment Setup](references/dev-environment-setup.md) — fresh clone to working environment | ||
| - [Java / Core Builds](references/build-java.md) — Java modules, gremlin-server, integration tests | ||
| - [Python GLV](references/build-python.md) — build, test, result evaluation | ||
| - [JavaScript GLV](references/build-javascript.md) — npm workspace, build, test, evaluation | ||
| - [.NET GLV](references/build-dotnet.md) — build, test, Docker setup | ||
| - [Go GLV](references/build-go.md) — build, test, Docker setup | ||
| - [Documentation](references/documentation.md) — AsciiDoc generation, website | ||
| - [Gremlin MCP Server](references/gremlin-mcp.md) — translation, formatting, querying via MCP |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # .NET GLV Build and Test | ||
|
|
||
| ## Requirements | ||
|
|
||
| - **.NET SDK 8.0+** — optional; Docker handles test execution via Maven. | ||
| - **Docker and Docker Compose** — required for running tests through Maven. | ||
| - **Maven** — preferred build orchestration. | ||
| - **Mono** — only needed for packing the `Gremlin.Net.Template` project. | ||
|
|
||
| ## Module Structure | ||
|
|
||
| ``` | ||
| gremlin-dotnet/ | ||
| ├── pom.xml Maven parent (packaging=pom) | ||
| ├── Gremlin.Net.sln .NET solution file | ||
| ├── src/ Source code (Gremlin.Net library + template) | ||
| │ ├── .glv Sentinel file to activate build | ||
| │ └── Gremlin.Net/ Main library | ||
| ├── test/ Test projects | ||
| │ ├── .glv Sentinel file to activate tests | ||
| │ ├── Gremlin.Net.UnitTest/ | ||
| │ ├── Gremlin.Net.IntegrationTest/ | ||
| │ ├── Gremlin.Net.Benchmarks/ | ||
| │ └── Gremlin.Net.Template.IntegrationTest/ | ||
| ├── Examples/ Example projects | ||
| └── docker-compose.yml Test infrastructure | ||
| ``` | ||
|
|
||
| ## Activation | ||
|
|
||
| Both `src` and `test` directories need `.glv` sentinel files: | ||
| ```bash | ||
| touch gremlin-dotnet/src/.glv | ||
| touch gremlin-dotnet/test/.glv | ||
| ``` | ||
|
|
||
| Without these files, TinkerPop still builds with Maven but .NET projects are skipped. | ||
|
|
||
| ## Maven Build Commands | ||
|
|
||
| Run from the repository root. | ||
|
|
||
| Build and test (requires Docker): | ||
| ```bash | ||
| mvn clean install -pl gremlin-dotnet,gremlin-dotnet-source,gremlin-dotnet-tests | ||
| ``` | ||
|
|
||
| The test execution uses Docker Compose to: | ||
| 1. Start a Gremlin Server test container (`gremlin-server-test-dotnet`) | ||
| 2. Run `dotnet test ./Gremlin.Net.sln -c Release` inside a .NET SDK 8.0 container | ||
| 3. Run example projects to verify they work | ||
| 4. Tear down containers | ||
|
|
||
| ## Docker Test Infrastructure | ||
|
|
||
| The `docker-compose.yml` defines: | ||
| - `gremlin-server-test-dotnet` — Gremlin Server on ports 45940-45942 and 4588 | ||
| - `gremlin-dotnet-integration-tests` — .NET SDK 8.0 container that runs `dotnet test` | ||
|
|
||
| The test container uses `dotnet-trx` for test result reporting. | ||
|
|
||
| ## Test Results | ||
|
|
||
| Test results are written as `.trx` files inside the container. On failure, check the | ||
| Maven console output for the `dotnet test` exit code and error summary. | ||
|
|
||
| ## Template Packaging | ||
|
|
||
| To pack the `Gremlin.Net.Template` NuGet package (requires Mono): | ||
| ```bash | ||
| mvn clean install -Dnuget | ||
| ``` | ||
|
|
||
| ## Evaluating Build Results | ||
|
|
||
| Use the Maven exit code to determine pass/fail: | ||
| - Exit `0` — success | ||
| - Non-zero — failure; check the `dotnet test` output in the Maven console | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| <!-- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # Go GLV Build and Test | ||
|
|
||
| ## Requirements | ||
|
|
||
| - **Go 1.22+** — optional for local development; Docker handles test execution via Maven. | ||
spmallette marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - **Docker and Docker Compose** — required for running tests through Maven. | ||
| - **Maven** — preferred build orchestration. | ||
|
|
||
| ## Module Structure | ||
|
|
||
| ``` | ||
| gremlin-go/ | ||
| ├── pom.xml Maven module (no Java source; Maven wraps Go) | ||
| ├── go.mod Go module definition | ||
| ├── go.sum Go dependency checksums | ||
| ├── run.sh Convenience script for Docker-based testing | ||
| ├── driver/ Go driver source and tests | ||
| │ ├── cucumber/ BDD feature test support | ||
| │ ├── resources/ Test resources | ||
| │ └── *.go / *_test.go Source and test files | ||
| ├── examples/ Example programs | ||
| └── docker-compose.yml Test infrastructure | ||
| ``` | ||
|
|
||
| ## Activation | ||
|
|
||
| Create a `.glv` sentinel file to include Go in standard builds: | ||
| ```bash | ||
| touch gremlin-go/.glv | ||
| ``` | ||
|
|
||
| Without this file, TinkerPop still builds with Maven but Go is skipped. | ||
|
|
||
| ## Maven Build Commands | ||
|
|
||
| Run from the repository root. | ||
|
|
||
| Build and test (requires Docker): | ||
| ```bash | ||
| mvn clean install -Pglv-go -pl gremlin-go | ||
spmallette marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| The Maven build uses Docker Compose to: | ||
| 1. Start a Gremlin Server test container | ||
| 2. Run `go test -v -json ./... -race -covermode=atomic` inside a Go container | ||
| 3. Run example programs | ||
| 4. Tear down containers and prune dangling images | ||
|
|
||
| ## Convenience Script | ||
|
|
||
| From `gremlin-go/`: | ||
| ```bash | ||
| ./run.sh # Uses current project version | ||
| ./run.sh 4.0.0-SNAPSHOT # Specify server version | ||
| ./run.sh 3.8.0 # Use a released version | ||
| ``` | ||
|
|
||
| The default requires a SNAPSHOT server image built with: | ||
| ```bash | ||
| mvn clean install -pl :gremlin-server -DskipTests -DskipIntegrationTests=true -am | ||
| mvn install -Pdocker-images -pl :gremlin-server | ||
| ``` | ||
|
|
||
| ## Docker Test Infrastructure | ||
|
|
||
| The `docker-compose.yml` defines: | ||
| - `gremlin-server-test` — Gremlin Server on ports 45940-45942 and 4588 | ||
| - `gremlin-go-integration-tests` — Go 1.25 container that runs tests with race | ||
| detection, coverage, and `gotestfmt` for formatted output | ||
|
|
||
| Environment variables in the test container: | ||
| - `CUCUMBER_FEATURE_FOLDER` — path to Gherkin feature files | ||
| - `GREMLIN_SERVER_URL` — server endpoint for integration tests | ||
| - `RUN_INTEGRATION_TESTS=true` | ||
| - `RUN_BASIC_AUTH_INTEGRATION_TESTS=true` | ||
|
|
||
| ## Local Development | ||
|
|
||
| After installing Go locally: | ||
| ```bash | ||
| cd gremlin-go | ||
| go build ./... | ||
| go test ./driver/ -run TestName | ||
| ``` | ||
|
|
||
| For integration tests, a running Gremlin Server is required. | ||
|
|
||
| ## Evaluating Build Results | ||
|
|
||
| Use the Maven exit code to determine pass/fail: | ||
| - Exit `0` — success | ||
| - Non-zero — failure; check the `go test` output in the Maven console | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.