Share root scaffolding between the two monorepo builders - #27
Merged
Conversation
buildMonorepo (libraries) and buildFullstack duplicated their entire root
scaffolding — the community/agents/gitfiles reuse, eslint.config.js,
.prettierrc.json, tsconfig.base.json, pnpm-workspace.yaml, ci.yml, and
packkit.json were copy-pasted between them. That's the "implemented twice"
the review flagged, and 2.9's fullstack addition made it a second copy.
Extracted into one workspaceScaffold(cfg, { workspaceGlobs, tsconfigLib })
that both builders call; each still supplies its own root package.json,
turbo tasks, and packages. −40 lines, and that scaffolding is now
maintained once.
Verified byte-identical across all 48 monorepo/fullstack configs (pm ×
license × scoped-name), via an order-insensitive file-content snapshot
against pre-refactor main.
Scoped deliberately: this does NOT merge the monorepo path into the
single-package feature pipeline (the "every project is a set of
workspaces" graph rewrite). The reviewer framed that as longer-term, and
it would change monorepo output rather than refactor it. This removes the
real duplication safely; the deeper merge stays a separate effort.
99 tests pass, lint clean, web configurator verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last of the architecture-review refactors.
buildMonorepo(libraries) andbuildFullstackduplicated their entire root scaffolding — the community/agents/gitfiles reuse,eslint.config.js,.prettierrc.json,tsconfig.base.json,pnpm-workspace.yaml,ci.yml, andpackkit.jsonwere copy-pasted between them. That's the "features implemented twice" the review flagged, and 2.9's fullstack layout made it a second copy.Change
Extracted into one
workspaceScaffold(cfg, { workspaceGlobs, tsconfigLib })that both builders call. Each still supplies its own rootpackage.json, turbo tasks, and packages on top. −40 lines, and that scaffolding is now maintained once.Verified byte-identical
An order-insensitive file-content snapshot across all 48 monorepo/fullstack configs (pm × license × scoped-name) captured from pre-refactor
main: zero differences.fullstackstill generates 37 files.Scope — deliberately bounded
This does not merge the monorepo path into the single-package feature pipeline (the "every project is a set of workspaces, a plain package is a project with one" graph rewrite). The reviewer themselves framed that as longer-term, and it would change monorepo output rather than refactor it — not a byte-safe change. This removes the real, concrete duplication safely; the deeper structural merge stays a separate, larger effort if it's ever worth it.
99 tests pass, lint clean, web configurator verified.
🤖 Generated with Claude Code