Package boundaries
Allowed production dependency direction is:
shared <- core <- vue <- themes (optional; may depend on vue)
^
|
mcp (optional Node-only tooling; ADR 0015)
nuxt (optional integration) -> vue (peer), themes (optional peer)mcp may depend on core only among @ghostvue/* packages. It does not import vue, themes, or shared at runtime; bundled assets supply manifest, example, docs, and token snapshots. Because core is internal and never published, that edge is build-time only: the schema is copied into the bundle, and mcp must not list core in a production dependency group.
sharedhas no internal production dependency.coremay depend onshared.vuemay depend oncoreandshared.vuemust never depend onthemes.themesis optional. Headless packages must not require it. It may depend onvueso themed wrappers can import unstyled components and composables. That edge is recorded here, in ADR 0004, and inscripts/workspace-packages.mjsnow that themedGhostButtonis the first wrapper.nuxtis an optional framework integration. It may depend onvueand, only as an optional peer for the explicit themed/CSS opt-in, onthemes. Nothing depends onnuxt:shared,core,vue, andthemesmust never import Nuxt,@nuxt/*, orunplugin-vue-components(library-packages-no-nuxtin.dependency-cruiser.mjs). Theunplugin-vue-componentsresolver (@ghostvue/vue/resolver) therefore matches the plugin's resolver contract structurally instead of importing it.eslint-plugin(@ghostvue/eslint-plugin) is Node-only tooling with no internal production dependency, and no package may depend on it. It reads component contracts frompackages/vue/manifestsandpackages/themes/manifeststhrough a generated data module (pnpm registries:write), not through imports, so it never loads Vue or component code. See the ESLint plugin docs.mcp(@ghostvue/mcp, ADR 0015,GHO-17 contract) is Node-only MCP stdio tooling with theghostvue-mcpbin. It may depend on@ghostvue/core(manifest schema) and the pinned@modelcontextprotocol/sdk,zod, andajvapproved in plan §7 (added with the server, not the scaffold). It must not depend onvue,@ghostvue/vue, or@ghostvue/themes, or import@ghostvue/shared; manifests, examples, docs, and tokens are copied into the package at build time, not imported from source. The catalog entry'sforbiddenDependenciesmakespnpm boundariesrejectvue,@ghostvue/vue, and@ghostvue/themesin anypackage.jsondependency group (including devDependencies), and themcp-no-vuerule in.dependency-cruiser.mjsrejects those imports in source, mirroringeslint-plugin. No package may depend on@ghostvue/mcp.
Themed Vue components belong in themes. Headless composables and thin unstyled components belong in vue. Do not add a third package merely to host styled twins.
scripts/workspace-packages.mjs is the executable catalog of package responsibilities and allowed internal dependencies. Its publishable flag marks the npm release train (vue, themes, nuxt, eslint-plugin, mcp); core and shared are internal, never released, and no publishable package may list them in a production dependency group (see releases). Manifest edges and source-level import boundaries (layering, no circular imports, no cross-package relative imports, and no direct imports from dist) are enforced by scripts/check-package-boundaries.mjs and .dependency-cruiser.mjs (pnpm boundaries). tests/integration/package-boundaries.test.ts exercises representative import rules (core-to-Vue layering, cross-package relative imports, and mcp-no-vue) and the real checker CLI, including manifest validation (@ghostvue/mcp forbidden dependencies among them) and fixture/build-output exclusions.
Adding a package
A new package requires a responsibility that cannot remain coherent in an existing package. Document its purpose and dependency direction, add build and typecheck scripts, register it in scripts/workspace-packages.mjs and the root TypeScript project, and explain its public entry point. pnpm published-exports requires those entry points to exist on disk after pnpm build. An anticipated future use is not by itself sufficient evidence.
Development apps may consume packages to exercise them. They are not published and must not become a hidden source of production logic. The unpublished examples/ tree is the same kind of development host: it may import vue and themes but is not a workspace package.