Plan 3c Phase 9b — workspace adapter publish (plan-3c-phase9b). Closes the 1.5.0 Infrastructure note ("5 workspace placeholder packages remain at 0.0.0-prework") by shipping the 5 first-party AST adapters as standalone npm packages alongside @massu/core@1.6.0. Architecture is Z+II: workspace package source is canonical (packages/adapter-<f>/src/index.ts); @massu/core consumes those packages as workspace dependencies and bundles their built dist/ into its own dist/detect/adapters/<f>.js via a build step (packages/core/scripts/bundle-adapters.ts). True single-source-of-truth: same source produces both the CORE-BUNDLED artifact and the standalone REGISTRY-VERIFIED tarball; sha256 reproducibility is structurally enforced.
End-users on 1.5.x are unaffected — 1.6.0 is additive, zero-config preserved, no breaking changes. Users who want the REGISTRY-VERIFIED trust class can now npm install @massu/adapter-rails (etc.) for the same code with a fully signed manifest sha256 chain end-to-end.
Daemon code unchanged from 1.5.8 — any in-flight 1.5.x soak verdict applies to 1.6.0.
Added
@massu/adapter-rails@1.0.0— first-party Rails adapter, standalone npm package. Tarball shasum:1944b1a4568b5c9f07a457a93050a926f78ac76f(pernpm view @massu/adapter-rails dist.shasum). Seepackages/adapter-rails/CHANGELOG.md.@massu/adapter-phoenix@1.0.0— first-party Phoenix adapter, standalone npm package. Tarball shasum:22d856030b8d220d3846d7f16d32d7daa41b76ea. Seepackages/adapter-phoenix/CHANGELOG.md.@massu/adapter-aspnet@1.0.0— first-party ASP.NET Core adapter, standalone npm package. Tarball shasum:2fff624d3491ced5a831f7b7dce36928e91020a2. Seepackages/adapter-aspnet/CHANGELOG.md.@massu/adapter-spring@1.0.0— first-party Spring adapter, standalone npm package. Tarball shasum:b3f7a87e0f25c9174c4e3540c1a255feb333a6cb. Seepackages/adapter-spring/CHANGELOG.md.@massu/adapter-go-chi@1.0.0— first-party go-chi adapter, standalone npm package. Tarball shasum:48916c0b6e8c7ed0c53d60acb170bef39dffea15. Seepackages/adapter-go-chi/CHANGELOG.md.@massu/core/adapterruntime helpers in the SemVer-stable surface —adapter.tsnow re-exportsrunQuery,loadGrammar,isParsableSource,MAX_AST_FILE_BYTES, andInvalidQueryErrorso workspace adapters import everything they need from a single subpath. The published tarball ships bundleddist/adapter.js(~32 kB ESM) +dist/adapter.d.ts(1.7 kB) so downstream Node consumers AND tsc resolve cleanly without chasing transitive.tssource.packages/core/scripts/bundle-adapters.ts— esbuild-driven build step that copies the 5 workspace adapterdist/index.jsfiles intopackages/core/dist/detect/adapters/<f>.jsand computes a sha256 sentinel atdist/detect/adapters/.bundle-shasums.json. Reproducibility enforced byadapter-bundle-reproducibility.test.ts(P-B-003).- Three new structural drift-guard tests —
adapter-source-of-truth.test.ts(everyCORE_BUNDLED_IDSentry has exactly one canonical source — either core or workspace, never both),adapter-bundle-reproducibility.test.ts(re-running the bundle step from a clean tmpdir produces byte-identical sha256s), andcore-bundled-files-presence.test.ts(every workspace-canonical id has a correspondingdist/detect/adapters/<id>.jsafter build). The fourth gate,adapter-manifest-roundtrip.test.ts(P-D-001), runs in CI whenMASSU_MANIFEST_ROUNDTRIP=1against the live registry manifest. - Pattern-scanner Check 12 — adapter import direction guard —
scripts/massu-pattern-scanner.shnow refuses anyimport . from '@massu/adapter-'outsidepackages/core/src/detect/adapters/<id>.tsre-export shims (drift-prevention #3). Inverse imports would create circular runtime deps that npm workspaces silently allow. - Vitest 4
test.projectsshape — new rootvitest.config.tsruns both core (~141 test files) and the 5 adapter packages (5 × 1 smoke test each) in a singlenpm testinvocation. Replaces the deprecated Vitest 3defineWorkspace/vitest.workspace.tspattern (removed in Vitest 4.x). - Tarball E2E CI extension (P-D-002) —
.github/workflows/ci.ymltarball-e2ejob now also packs eachpackages/adapter-and asserts the published shape (nosrc/, no.test.ts, notsconfig.jsonleak; LICENSE + README.md +dist/index.{js,d.ts}+package.jsonrequired). Adds the manifest round-trip gate.
Changed
packages/core/package.json— version1.5.8→1.6.0. Newdependenciesfor the 5 workspace adapters ("@massu/adapter-rails": "^1.0.0", etc.) so the build pipeline pulls in workspace symlinks. Newexports."./adapter"conditional shape with explicittypes: "./dist/adapter.d.ts"+import: "./dist/adapter.js"(was raw./src/adapter.ts— caused R9 runtime resolution failures for downstream consumers).- Root
package.json:scripts.build— explicit chainbuild:adapter-types && build:adapter-subpath && build:adapters && build:coreso workspace adapters always build beforebundle-adapters.tsruns (P-A-016 build-ordering fix; npm--workspacesruns alphabetically, not topologically). packages/core/src/detect/adapters/{rails,phoenix,aspnet,spring,go-chi}.ts— replaced with 4-line re-export shims (export * from '@massu/adapter-<f>'). Source moved to workspace package; CORE-BUNDLED behaviour preserved via the bundle step.packages/adapter-*/package.json— version0.0.0-prework→1.0.0;private: trueremoved;peerDependencies."@massu/core": ">=1.5.8 <2.0.0"(intentionally widened to keep 1.5.x consumers compatible — 1.5.x already CORE-BUNDLES the same code, so peer is loose by design).scripts/PUBLIC_MANIFEST.md— updated notes for the 5packages/adapter-*entries to reflect the new published 1.0.0 versions (no path changes; they remain in PUBLIC_DIRS).
Verification
npx tsc --noEmit: 0 errors (packages/core)npm test(Node 22):2123 passed | 9 skipped (2132)across 146 test files (was2087/2087per 1.5.7; +36 new tests across the 4 structural drift-guards + 5 adapter smoke tests + the manifest round-trip)bash scripts/massu-pattern-scanner.sh: PASS (13 checks, including the new Check 12 adapter import direction guard)bash scripts/massu-generalization-scanner.sh: PASSbash scripts/massu-plan-status-validator.sh: PASS (55 plans scanned, 0 violations)bash scripts/massu-plan-commit-drift.sh: PASSnpm view @massu/core version:1.6.0npm view @massu/core dist.shasum:e3f74555959db52462d14eb1223b3c2d8937a430npm view @massu/adapter-rails version(× 5 adapters):1.0.0- Smoke test from clean tmpdir:
npm install @massu/core@1.6.0 @massu/adapter-rails@1.0.0exits 0;node -e "import('@massu/adapter-rails').then(m => console.log(typeof m.railsAdapter))"printsobject
Closes
- The 1.5.0 CHANGELOG
Infrastructurenote ("5 workspace placeholder packages remain at0.0.0-prework") — workspace publish is now SHIPPED. - Master plan row 4.12 ("Phase 9b — workspace adapter publish") — moved from APPROVED → SHIPPED.
- The originating obligation in Plan 3c §Stage 3 Phase 9 line 157 ("Workspace publish for 5 adapters").
- Plan 3c Phase 9b audit: converged at 0 gaps after 7 iterations (22 → 6 → 5 → 6 → 3 → 3 → 0).