Repository architecture
The workspace separates publishable responsibilities from development and engineering support:
packages/shared proven framework-neutral low-level utilities
packages/core framework-independent behavior and contracts
packages/vue Vue lifecycle, reactivity, composables, and components
packages/themes optional theme and design-token infrastructure
packages/eslint-plugin manifest-based ESLint usage rules (Node-only tooling)
apps/docs VitePress command wrapper for canonical docs
apps/playground manual development and browser-test host
examples typed executable samples (unpublished)
tests cross-package integration and browser tests
docs canonical product and engineering documentation
scripts repository invariants (`pnpm boundaries`, `pnpm manifests`)Directories exist only when they serve current tooling or express a real boundary. The project avoids speculative base components, managers, registries, engines, and empty expansion trees.
Architectural commitments
Framework-independent code belongs in core only when independence is useful in practice. Vue lifecycle or effect-scope semantics remain in vue; forcing them through an abstract core would reduce clarity.
Headless behavior may not depend on themes. Consumers remain free to use plain CSS, Tailwind, CSS Modules, another design system, or no prebuilt theme.
Public package entry points are intentional contracts. Internal files should be imported directly within a package; networks of nested index.ts barrels hide dependency direction and encourage cycles.
SSR-safe ids and controlled/uncontrolled v-model behavior live in component-state.md (useGhostId, useControllableState). Overlay Tab traps and APG roving tabindex live in focus.md (useFocusScope, useRovingFocus). Coded development diagnostics (GHOST0xx) live in @ghostvue/vue and are listed in warnings.md. They stay in vue until a second package needs to emit them; @ghostvue/shared remains empty until then. Per-component public contracts for agents, MCP, codegen, and evals live in component-manifest.md.
Tooling choices
Vite builds the Vue library and development apps. TypeScript emits the small framework-neutral packages directly, including their .d.ts files. The Vue package runs vue-tsc after vite build because Vite empties dist before writing the bundle. pnpm published-exports then asserts that each library package's types and exports targets exist on disk so a missing dist/index.d.ts cannot pass pnpm verify, and that each publishable tarball has a README and no test files or dangling source maps. Published output carries no source maps because the tarballs ship dist/ without src/. Vitest, Vue Test Utils, Playwright, and axe cover complementary test levels. VitePress publishes the same canonical Markdown that contributors and agents read.
Storybook is deferred. Before real components exist, it would duplicate the playground and documentation responsibilities without providing meaningful stories. Reconsider it when component development demonstrates a concrete review or visual-regression need.
scripts/check-package-boundaries.mjs validates package manifest edges against scripts/workspace-packages.mjs and runs dependency-cruiser (configured in .dependency-cruiser.mjs) to enforce source-level package layering, forbid circular imports, block cross-package relative imports, and reject imports from dist.