Skip to content

feat: add the builder package - #646

Merged
mobeenabdullah merged 23 commits into
mainfrom
feat/builder-package
Aug 11, 2026
Merged

mobeenabdullah merged 23 commits into
mainfrom
feat/builder-package

Conversation

@mobeenabdullah

@mobeenabdullah mobeenabdullah commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Plan 04's B-1. The package exists so its name can be claimed; it has no
features, and that is the whole scope.

⚠️ DO NOT MERGE YET — this PR is step 1 of 4, and the order matters

Trusted publishing (OIDC) cannot perform a package's first publish, and the
bootstrap script refuses a package that is not already in the workspace:

$ node scripts/release/bootstrap-package.mjs @nextlyhq/builder    # before this PR
@nextlyhq/builder is not a publishable package in this workspace.

So the claim cannot precede the package, and the merge cannot precede the claim
— merging first puts a package in the lockstep train whose first publish answers
404 and strands it after the others are live.

The sequence:

  1. this PR, open and unmerged
  2. Founder, with this branch checked out and npm login done:
    node scripts/release/bootstrap-package.mjs @nextlyhq/builder --publish
  3. Founder attaches the Trusted Publisher on npmjs.com (repo
    nextlyhq/nextly, workflow release.yml, environment Production)
  4. Merge

The dry run already passes on this branch:

Bootstrap @nextlyhq/builder@0.0.0
  contents: package.json + README.md only (no code)
  workspace version (published later by CI): 0.0.2-alpha.55
Dry run. Nothing was published.

What actually ships

No features. src/index.ts exports one constant and carries the module
doc. What this PR really adds is the package's boundary, made executable:

src/layering.test.ts enforces two promises as an allowlist (a blocklist
only stops what someone thought to name):

  1. Never import @nextlyhq/admin directly — the only route is
    @nextlyhq/plugin-sdk/admin, the curated facade where each export carries a
    stability tag. This matters more here than elsewhere: Phase 3 has a
    sanctioned reason to want admin code (the Lexical node set for B-19,
    founder-decided 2026-08-11 to go through the facade), so this test keeps the
    shortcut closed while that extraction is in flight. Checked as a prefix, so
    @nextlyhq/admin/anything is caught too.
  2. Do not re-implement rendering@nextlyhq/blocks-react is on the
    allowlist because the canvas draws with the same renderer that serves
    published pages (Plan 04 D-04.7). The previous generation carried its own
    renderer, and the two disagreed about condition gating in opposite
    directions
    for as long as both existed (task 175).

Imports are read from the TypeScript AST, not by regex, and the suite opens
with a positive control asserting it read files at all — a guard that passes
because it found nothing is a failure mode this program has paid for repeatedly.

Stub-verified: adding import { Card } from "@nextlyhq/admin" to
src/index.ts fails both layering assertions; removing it restores green.

Two things caught while building it

The tsconfig does NOT exclude test files (Plan 04 D-04.9). Four packages
currently ship test files no tsc ever checks, which makes type-level
assertions in them decorative; admin proves the strict pattern works. The new
package starts correct — check-types is a single tsc --noEmit.

@nextlyhq/builder was missing from the changeset fixed group, so it would
have versioned on its own while every other package moved in lockstep. Caught by
asserting the group actually contained it rather than assuming the generated
changeset was right. Fixed in the second commit; the group is now 23.

3 tests; build, typecheck and lint clean.

Summary by CodeRabbit

  • New Features

    • Introduced the initial @nextlyhq/builder package foundation for editor-based page building and rendering.
    • Added package metadata, build configuration, and publishing support for distribution.
  • Documentation

    • Documented the Builder package’s role, access path, and integration boundaries.
  • Chores

    • Added Builder support to project validation, linting, testing, and release workflows.
    • Added automated checks to enforce approved package integrations and import boundaries.

The editor half of the rebuilt page builder needs to exist before its name can
be claimed on npm: trusted publishing cannot perform a first publish, and the
bootstrap script refuses a package that is not already in the workspace.

No features. What ships is the boundary: the canvas will render through
blocks-react rather than carry a renderer of its own, and admin is reachable
only through the plugin-sdk facade. A layering test enforces both, with a
positive control so it cannot pass by reading nothing.

The first-publish acknowledgement is added here so release preflight can tell a
placeholder-only package apart from a missing trusted publisher.
The package was added without an entry in the fixed group, so it would have
versioned on its own while every other package moved together, and its changeset
would have named twenty-two packages that no longer describe the set.
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mobeenabdullah, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a1f1f2f5-a852-479a-a970-1c50953a75be

📥 Commits

Reviewing files that changed from the base of the PR and between 50c2242 and 5f8b92f.

📒 Files selected for processing (4)
  • packages/builder/README.md
  • packages/builder/eslint.config.js
  • packages/builder/src/layering.test.ts
  • turbo.jsonc
📝 Walkthrough

Walkthrough

Adds the initial @nextlyhq/builder package with its entry point, build and test tooling, import-boundary validation, CI and lint integration, commit scope support, repository guidance, and release acknowledgement.

Changes

Builder package

Layer / File(s) Summary
Package contract and tooling
packages/builder/package.json, packages/builder/src/index.ts, packages/builder/tsconfig.json, packages/builder/tsup.config.ts, packages/builder/vitest.config.ts, packages/builder/eslint.config.js
Adds the package manifest, readonly package-name export, TypeScript configuration, ESM bundling, Vitest setup, and shared React ESLint configuration.
Import boundary validation
packages/builder/src/layering.test.ts
Adds AST-based import scanning and tests for runtime and test-only allowlists, unresolved imports, supported import forms, and forbidden package boundaries.
Repository integration
.github/workflows/ci.yml, .github/workflows/pr-title.yml, eslint.config.mjs, AGENTS.md, scripts/release/first-publish-acknowledged.json
Registers the package with CI tests, React lint rules, Conventional Commit scopes, repository guidance, and first-publish acknowledgement.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • nextlyhq/nextly#329: Adds the builder package and related CI, linting, publishing, and Trusted Publisher integration.
  • nextlyhq/nextly#308: Connects the builder package with the CLI plugin template workflow.
  • nextlyhq/nextly#193: Adds builder-specific repository guidance in AGENTS.md.

Suggested labels: scope: core

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description gives useful context and test results but omits the required template sections, checkboxes, and explicit checklist confirmations. Rewrite the description using the repository template and complete the type, changeset, test plan, checklist, and reviewer notes sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding the builder package.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/builder-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b18c51d1b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/index.ts Outdated
Comment thread packages/builder/package.json Outdated
Comment thread packages/builder/src/layering.test.ts
Comment thread packages/builder/src/layering.test.ts Outdated
@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nextlyhq/adapter-drizzle

npm i https://pkg.pr.new/@nextlyhq/adapter-drizzle@5f8b92f

@nextlyhq/adapter-mysql

npm i https://pkg.pr.new/@nextlyhq/adapter-mysql@5f8b92f

@nextlyhq/adapter-postgres

npm i https://pkg.pr.new/@nextlyhq/adapter-postgres@5f8b92f

@nextlyhq/adapter-sqlite

npm i https://pkg.pr.new/@nextlyhq/adapter-sqlite@5f8b92f

@nextlyhq/admin

npm i https://pkg.pr.new/@nextlyhq/admin@5f8b92f

@nextlyhq/admin-css

npm i https://pkg.pr.new/@nextlyhq/admin-css@5f8b92f

@nextlyhq/blocks-engine

npm i https://pkg.pr.new/@nextlyhq/blocks-engine@5f8b92f

@nextlyhq/blocks-react

npm i https://pkg.pr.new/@nextlyhq/blocks-react@5f8b92f

@nextlyhq/builder

npm i https://pkg.pr.new/@nextlyhq/builder@5f8b92f

create-nextly-app

npm i https://pkg.pr.new/create-nextly-app@5f8b92f

nextly

npm i https://pkg.pr.new/nextly@5f8b92f

@nextlyhq/plugin-form-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-form-builder@5f8b92f

@nextlyhq/plugin-page-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-page-builder@5f8b92f

@nextlyhq/plugin-sdk

npm i https://pkg.pr.new/@nextlyhq/plugin-sdk@5f8b92f

@nextlyhq/plugin-seo

npm i https://pkg.pr.new/@nextlyhq/plugin-seo@5f8b92f

@nextlyhq/storage-s3

npm i https://pkg.pr.new/@nextlyhq/storage-s3@5f8b92f

@nextlyhq/storage-uploadthing

npm i https://pkg.pr.new/@nextlyhq/storage-uploadthing@5f8b92f

@nextlyhq/storage-vercel-blob

npm i https://pkg.pr.new/@nextlyhq/storage-vercel-blob@5f8b92f

@nextlyhq/ui

npm i https://pkg.pr.new/@nextlyhq/ui@5f8b92f

commit: 5f8b92f

@github-actions github-actions Bot added type: docs Documentation only dependencies Dependency updates (label applied by Dependabot) labels Aug 10, 2026
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85b5741f3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/package.json
Comment thread packages/builder/src/layering.test.ts Outdated
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf1e562e37

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/layering.test.ts
Comment thread packages/builder/src/layering.test.ts Outdated
@mobeenabdullah mobeenabdullah changed the title feat(builder): create the package feat: add the builder package Aug 11, 2026
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b684cbe0ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/layering.test.ts
Comment thread packages/builder/eslint.config.js
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b29229094

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md Outdated
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/builder/tsconfig.json (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

check-types does not cover the package's own config files.

include is limited to src/**/*. tsup.config.ts and vitest.config.ts are TypeScript files at the package root, so tsc --noEmit skips them. A type error in either file reaches CI only when the build or the test run fails. Consider adding the root config files to include, or add a second tsconfig for them, if the other packages in this repository do the same.

♻️ Optional: widen the type-check surface
-  "include": ["src/**/*"],
+  "include": ["src/**/*", "tsup.config.ts", "vitest.config.ts"],
   "exclude": ["dist", "node_modules"]

Note: rootDir: "src" conflicts with including files outside src only when emitting. check-types uses --noEmit, and tsup performs the build, so the emit path is unaffected.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/builder/tsconfig.json` around lines 9 - 10, Update the package
tsconfig include configuration to type-check the root TypeScript config files
tsup.config.ts and vitest.config.ts in addition to src/**/*, while preserving
the existing no-emit check-types behavior and exclude settings.
packages/builder/tsup.config.ts (1)

18-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document tsup’s automatic dependency externalization. @nextlyhq/blocks-engine and @nextlyhq/blocks-react are runtime dependencies, and tsup 8.5.0 externalizes them by default. Adding them to external is redundant.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/builder/tsup.config.ts` around lines 18 - 24, Update the tsup
configuration’s external list by removing any redundant entries for
`@nextlyhq/blocks-engine` and `@nextlyhq/blocks-react`, relying on tsup’s automatic
externalization for these runtime dependencies while preserving the explicitly
configured externals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/builder/eslint.config.js`:
- Around line 1-4: Correct the comment above the ESLint configuration to
identify this package as the builder, not the renderer; describe that rendering
is delegated to `@nextlyhq/blocks-react` while preserving the explanation of
shared React rule layering and direct package linting.

---

Nitpick comments:
In `@packages/builder/tsconfig.json`:
- Around line 9-10: Update the package tsconfig include configuration to
type-check the root TypeScript config files tsup.config.ts and vitest.config.ts
in addition to src/**/*, while preserving the existing no-emit check-types
behavior and exclude settings.

In `@packages/builder/tsup.config.ts`:
- Around line 18-24: Update the tsup configuration’s external list by removing
any redundant entries for `@nextlyhq/blocks-engine` and `@nextlyhq/blocks-react`,
relying on tsup’s automatic externalization for these runtime dependencies while
preserving the explicitly configured externals.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 45c7b317-2442-4b69-be34-05a760b2a1af

📥 Commits

Reviewing files that changed from the base of the PR and between 891ec3b and 50c2242.

⛔ Files ignored due to path filters (3)
  • .changeset/builder-package.md is excluded by !.changeset/**
  • .changeset/config.json is excluded by !.changeset/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • .github/workflows/ci.yml
  • .github/workflows/pr-title.yml
  • AGENTS.md
  • eslint.config.mjs
  • packages/builder/eslint.config.js
  • packages/builder/package.json
  • packages/builder/src/index.ts
  • packages/builder/src/layering.test.ts
  • packages/builder/tsconfig.json
  • packages/builder/tsup.config.ts
  • packages/builder/vitest.config.ts
  • scripts/release/first-publish-acknowledged.json

Comment thread packages/builder/eslint.config.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50c2242386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/layering.test.ts
Comment thread packages/builder/src/layering.test.ts Outdated
Comment thread packages/builder/src/layering.test.ts Outdated
Comment thread packages/builder/package.json
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9af8d23fc9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/layering.test.ts
Comment thread .github/workflows/ci.yml
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fd2f886c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/builder/src/layering.test.ts
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex please review this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 5f8b92face

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mobeenabdullah
mobeenabdullah merged commit 743772f into main Aug 11, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates (label applied by Dependabot) type: docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant