From 25f9e1050fbc00eb9babd68d759c12540992209c Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Sat, 30 May 2026 23:37:55 +0100 Subject: [PATCH] docs(npm-exemptions): mirror hypatia#405 vscode-* + tree-sitter-* carve-outs (standards#253) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors hypatia#405 (`:nodejs_detected` carve-out extension) into the two policy surfaces under standards: - `.claude/CLAUDE.md §npm Exemptions (Approved)` — adds 6 new exemption rows (vscode- substring, tree-sitter- substring, /.lake/, /office-addin/, /bindings/javascript/, /bindings/typescript/). - `rhodium-standard-repositories/.github/workflows/language-policy.yml` — adds parallel `grep -vE` filters to the NEW_NPM_LOCK block, updates carve-out comment from "6 classes" to "8 classes". Refs: hypatia#405. Closes the rule/policy gap surfaced during the standards#253 STEP 3 batch (root-level vscode-* and tree-sitter-* repos were flagged by the previous narrower `/vscode/` segment match). Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/CLAUDE.md | 7 ++++++- .../.github/workflows/language-policy.yml | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 1f3b5382..2bec9503 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -171,11 +171,16 @@ In-flight migration tracked under `hyperpolymath/standards#253` (172 manifests a | Path / Pattern | Class | Rationale | Unblock condition | |---|---|---|---| -| `**/vscode/**` | VSCode extension host-required | VSCode extension toolchain runs under Node; lockfile is contractually required by the host. | When AffineScript ships the VSCode-extension API binding. | +| `**/vscode/**` | VSCode extension host-required (segment) | VSCode extension toolchain runs under Node; lockfile is contractually required by the host. | When AffineScript ships the VSCode-extension API binding. | +| `vscode-` substring (`vscode-extension/`, `editors/vscode-007/`, `vscode-a2ml`, `vscode-k9`, …) | VSCode-* extension repos / subdirs | Same VSCode host-required toolchain rationale; different path-segment shape than `/vscode/`. | When AffineScript ships the VSCode-extension API binding. | +| `tree-sitter-` substring (`tree-sitter-a2ml`, `tree-sitter-k9`, `editors/tree-sitter-ephapax`, `tree-sitter-affinescript/`, …) | tree-sitter grammar npm-publish target | Class C consumer artifact — tree-sitter grammars ship via npm with `node-gyp` native binding because every consumer (Atom/Neovim/VSCode TextMate) links the native addon. | Never — npm-publishable consumer artifact with native binding. | | `affinescript-deno-test/**`, `affinescript-cli/**` | bootstrap shim | Bootstrap the AffineScript toolchain itself. | When AffineScript self-hosts these. | | `rescript/**`, `servers/**`, `repos-monorepo/**`, `linguist/**` | upstream fork | Not estate-authored — vendored upstream code. | Never — upstream fork. | | `hyperpolymath-archive/**` | archived | Archived repos cannot accept PRs. | Never — archived. | | `**/deps/**`, `**/node_modules/**` | vendored package-manager dep | Vendored deps. | Never — vendored upstream. | +| `**/.lake/**` | Lean4 vendored package | Lean4's package manager directory, parallel to `/deps/`. | Never — vendored. | +| `**/office-addin/**` | Office.js add-in host-required | Office host loads `.js` from a Node-packaged manifest, parallel to VSCode extension carve-out. | When AffineScript ships an Office.js binding. | +| `**/bindings/javascript/**`, `**/bindings/typescript/**` | consumer-facing estate export | Proven JS/TS bindings published to npm consumers, parallel to `/bindings/deno/` under `:typescript_detected`. | Never — consumer-facing bindings. | | `**/example/**`, `**/examples/**`, `**/test-fixtures/**`, `**/fixtures/**` | example/test fixture | Demonstrates an npm consumer (e.g., showing how a library is used from a Node project) without making the repo itself an npm consumer. | Never — fixture, not own toolchain. | ### JavaScript Exemptions (Approved) diff --git a/rhodium-standard-repositories/.github/workflows/language-policy.yml b/rhodium-standard-repositories/.github/workflows/language-policy.yml index aabcb9af..51284278 100644 --- a/rhodium-standard-repositories/.github/workflows/language-policy.yml +++ b/rhodium-standard-repositories/.github/workflows/language-policy.yml @@ -114,20 +114,29 @@ jobs: # Block new package-lock.json (npm banned 2026-05-25, replacement: Deno). # Carve-outs (parallel to hypatia cicd_rules/nodejs_detected - # path_allow_prefixes — 6 classes): - # **/vscode/ VSCode extension host-required toolchain + # path_allow_prefixes — 8 classes): + # **/vscode/ VSCode extension host-required toolchain (segment) + # vscode- VSCode-* extension repos / subdirs (substring) + # tree-sitter- tree-sitter grammar npm-publish targets (Class C) # affinescript-deno-test/ + affinescript-cli/ bootstrap shims # rescript/ + servers/ + repos-monorepo/ + linguist/ upstream forks # hyperpolymath-archive/ archived repos - # **/deps/ + **/node_modules/ vendored package-manager deps + # **/deps/ + **/node_modules/ + **/.lake/ + **/office-addin/ + # + **/bindings/{javascript,typescript}/ vendored / host-required / + # consumer-facing exports # **/example/ + **/examples/ + **/test-fixtures/ + **/fixtures/ NEW_NPM_LOCK=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null \ | grep -E '(^|/)package-lock\.json$' \ | grep -vE '/vscode/' \ + | grep -vE 'vscode-' \ + | grep -vE 'tree-sitter-' \ | grep -vE '^(affinescript-deno-test|affinescript-cli)/' \ | grep -vE '^(rescript|servers|repos-monorepo|linguist|hyperpolymath-archive)/' \ | grep -vE '/deps/' \ | grep -vE '/node_modules/' \ + | grep -vE '/\.lake/' \ + | grep -vE '/office-addin/' \ + | grep -vE '/bindings/(javascript|typescript)/' \ | grep -vE '/(example|examples|test-fixtures|fixtures)/' \ || true) if [ -n "$NEW_NPM_LOCK" ]; then