spmallette commented on code in PR #3341:
URL: https://github.com/apache/tinkerpop/pull/3341#discussion_r2987858870


##########
gremlin-js/gremlin-javascript/AGENTS.md:
##########
@@ -0,0 +1,138 @@
+### gremlin-javascript AGENTS.md
+
+This document provides stack-specific guidance for developers and AI agents 
working on the `gremlin-javascript`
+module. It supplements the root `AGENTS.md` file.
+
+---
+
+### 1. Maven and npm Workspace Relationship
+
+`gremlin-javascript` is part of the `gremlin-js` Maven parent module. 
Understanding this relationship is
+critical before making build or path changes.
+
+**Maven hierarchy:**
+```
+tinkerpop/pom.xml
+└── gremlin-js/pom.xml              ← Maven parent; runs `npm ci` at workspace 
root
+    ├── gremlin-javascript/pom.xml  ← this module
+    ├── gremlin-mcp/pom.xml
+    └── gremlint/pom.xml
+```
+
+**npm workspace hierarchy:**
+```
+gremlin-js/package.json             ← workspace root (node_modules/ lives here)
+├── gremlin-javascript/             ← workspace member "gremlin"
+├── gremlin-mcp/                    ← workspace member "gremlin-mcp"
+└── gremlint/                       ← workspace member "gremlint"
+```
+
+Because npm workspaces hoist shared dependencies to 
`gremlin-js/node_modules/`, packages such as `mocha`,
+`antlr4ng`, and `typescript` may **not** exist under 
`gremlin-javascript/node_modules/`. Scripts must
+reference them by name (e.g. `mocha`) rather than by relative path (e.g. 
`./node_modules/mocha/bin/mocha.js`).
+The `postinstall` script (`scripts/patch-antlr4ng.js`) uses `createRequire` to 
resolve packages through
+the workspace rather than assuming a local `node_modules/`.
+
+---
+
+### 2. Directory Structure
+
+```
+gremlin-javascript/
+├── lib/                    TypeScript source (driver, process, structure, 
language)
+│   └── language/

Review Comment:
   The ideas around what these AGENTS.md files are supposed to contain are 
constantly shifting. I've seen research that says including directory structure 
like this isn't helpful at all and in fact gets in the way of better answers 
because its exploratory phases are ignored. I dunno...that one could be 
probably removed or truncated. My intention there was mostly just to remind 
what those "socket-server" directories were, but it sounds like those dont' 
even matter at this point so perhaps it all can go.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to