Skip to content

chore(create-taujs): derive generated docs and pins from the scaffold plan and workspace peers - #167

Merged
aoede3 merged 2 commits into
mainfrom
chore/create-taujs-hygiene
Sep 7, 2026
Merged

aoede3 merged 2 commits into
mainfrom
chore/create-taujs-hygiene

Conversation

@aoede3

@aoede3 aoede3 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Hygiene for the scaffolder. Fixes drift and makes every generated document derive from data the scaffolder already acts on, guarded by tests that fail when they diverge.

  • Solid's fastify pin drifted (^5.2.0) from the @taujs/server peer (^5.8.5); now aligned.
  • Shared pins live in one table, framework extras in a Record<Framework, ...>; package.json generation is fully data-driven with no per-framework branch, byte-identical output.
  • README project tree is rendered from planFiles(); solid READMEs now list renderId.ts and tsconfig.solid.json and link to solidjs.com.
  • CLAUDE.md pointer names taujs_find_contract and states the server's tool listing is authoritative; a test asserts every tool name it mentions exists in @taujs/mcp.
  • pins.test.ts reads the workspace manifests and asserts fastify, vite, Vite plugins and runtime pins equal the peers, typescript and @types satisfy every floor, and engines.node equals the root.
  • CHANGELOG heading and keywords match the published package name. Patch changeset included.

Gates: pnpm -r build, pnpm -r --workspace-concurrency=1 test (incl. the lifecycle pack-and-boot test for all three frameworks), pnpm -r typecheck, check-format, check-exports, git diff --check.

… plan and workspace peers

Fixed drift: solid pinned fastify ^5.2.0 while react/vue pinned ^5.8.5 (the version
@taujs/server's own peerDependencies actually require) - solid now matches. The README's
"Project Structure" tree special-cased vue only, so every solid README silently omitted
renderId.ts and tsconfig.solid.json and linked react.dev instead of solidjs.com.

What now derives from what:
- generatePackageJson pulls shared pins (fastify, vite, typescript, tsx, cross-env, esbuild,
  @types/node) from one SHARED_PINS object, and each framework's own extras (renderer package,
  runtime, Vite plugin, @types) from a Record<Framework, ...> - a missing framework is a
  compile error, not a silently-skipped branch. pins.test.ts reads the workspace manifests
  (server/react/vue/solid package.json) directly and asserts the generated pins equal or
  satisfy those peers, so this cannot drift unnoticed again.
- generateReadme's tree is rendered from planFiles(config)'s real paths via a small
  directory-trie helper, with descriptions from one FILE_NOTES map and framework-varying
  bits (docs link, main UI file, client extension) from FRAMEWORK_META. README.md is now
  computed last, from the other entries' paths, to avoid a circular call. Tests in
  generate.test.ts assert every planned path has a note (no undocumented file), every note
  is claimed by some framework (no orphan), and the README lists every path in tree order.
- generateClaudeMd (src/mcp.ts) stays a short pointer but now names taujs_find_contract and
  points at skill-guided workflows without enumerating tool names that will rot; mcp.test.ts
  imports allTools from the new @taujs/mcp devDependency and asserts every taujs_* token the
  pointer names is a real tool.
- CHANGELOG.md's heading and package.json keywords now match the published package name.

Gates run from the worktree root: pnpm install, pnpm -r build, pnpm -r --workspace-concurrency=1 test (create-taujs: 5 files / 64 tests incl. the lifecycle pack-and-boot test), pnpm -r typecheck, pnpm check-format, pnpm check-exports, git diff --check - all green.
…d guard runtime pins

Review follow-up to the scaffold hygiene commit. Two hardening notes, both non-blocking:

- generatePackageJson still had three per-framework branches, so a fourth framework would
  satisfy the FRAMEWORK_EXTRAS record and fall through to the react branch. The branches
  differed only in the renderer package named in the esbuild externals and the lint script;
  both now come from the record (rendererPackage was previously unused; lint is new), and
  the dependency maps are built once and written in alphabetical key order - the order every
  framework already shipped in - so generated package.json output is byte-identical to before
  (checked for react, vue and solid against the previous commit's generator).
- pins.test.ts now also asserts each framework's runtime pins (react, react-dom, vue,
  @vue/server-renderer, solid-js) equal the renderer's own peerDependencies, and that the
  @types/* pins satisfy their peer floors.

Gates from the worktree root: pnpm -r build, pnpm -r --workspace-concurrency=1 test,
pnpm -r typecheck, pnpm check-format, pnpm check-exports, git diff --check.
@aoede3
aoede3 merged commit e0e9be8 into main Sep 7, 2026
3 of 4 checks passed
@aoede3
aoede3 deleted the chore/create-taujs-hygiene branch September 7, 2026 09:06
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant