Skip to content

Add Ultracite and intent to init flow#264

Merged
eluce2 merged 2 commits into
mainfrom
feature/init-ultracite-intent
May 15, 2026
Merged

Add Ultracite and intent to init flow#264
eluce2 merged 2 commits into
mainfrom
feature/init-ultracite-intent

Conversation

@eluce2
Copy link
Copy Markdown
Collaborator

@eluce2 eluce2 commented May 15, 2026

Summary

  • Add Ultracite and TanStack Intent setup to project init.
  • Write node engines, pnpm workspace, and npm min-release-age scaffolding files as needed.
  • Switch init post-setup checks to fix then lint, with safer command parsing.
  • Remove pnpm self-update flow and update templates for newer linting/runtime assumptions.
  • Raise supported Node range to 22/24/26 across repo packages and CI.

Testing

  • pnpm run ci
  • Not run: manual init/scaffold smoke test
  • Not run: fresh project fix/lint execution check

Summary by CodeRabbit

  • Breaking Changes

    • Node.js engine requirement restricted to major versions 22, 24, or 26 across packages.
  • New Features

    • Package-manager command parsing now supports shell-style quoting and escaping.
  • Improvements

    • Lint step runs separately and no longer blocks project setup on failure.
    • Project templates and scaffolds now declare the supported Node.js engine range.
  • Chores

    • CI workflows updated to use Node.js 22.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview, Comment May 15, 2026 2:46pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: 03a7538

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@proofkit/cli Patch
create-proofkit Patch
@proofkit/fmdapi Patch
@proofkit/fmodata Patch
@proofkit/typegen Patch
@proofkit/better-auth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/better-auth@264

@proofkit/cli

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/cli@264

create-proofkit

pnpm add https://pkg.pr.new/proofsh/proofkit/create-proofkit@264

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmdapi@264

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmodata@264

@proofkit/typegen

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/typegen@264

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/webviewer@264

commit: b99163f

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45c68357-80fd-46ae-b39d-c3919357a325

📥 Commits

Reviewing files that changed from the base of the PR and between b99163f and 03a7538.

📒 Files selected for processing (24)
  • .changeset/node-engine-support.md
  • .changeset/quiet-command-parsing.md
  • .github/workflows/check-skills.yml
  • .github/workflows/validate-skills.yml
  • package.json
  • packages/cli-old/package.json
  • packages/cli/src/cli/init.ts
  • packages/cli/src/consts.ts
  • packages/cli/src/core/executeInitPlan.ts
  • packages/cli/src/core/planInit.ts
  • packages/cli/src/helpers/intent.ts
  • packages/cli/src/helpers/ultracite.ts
  • packages/cli/src/utils/projectFiles.ts
  • packages/cli/template/vite-wv/package.json
  • packages/cli/template/vite-wv/src/routes/query-demo.tsx
  • packages/cli/tests/executor.test.ts
  • packages/cli/tests/init-run-init-regression.test.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/tests/integration.test.ts
  • packages/cli/tests/planner.test.ts
  • packages/cli/tests/test-layer.ts
  • packages/create-proofkit/package.json
  • packages/fmdapi/package.json
  • packages/fmodata/package.json

📝 Walkthrough

Walkthrough

This PR restricts Node.js engine support to versions 22, 24, and 26 across the monorepo; introduces a new parseCommandString utility for shell-style command tokenization with quote and escape support; centralizes NODE_RUNTIME_VERSION; refactors CLI init and execute paths to use the parser for package-manager commands; and updates tests and CI workflows.

Changes

Node Engine Support and CLI Command Parsing

Layer / File(s) Summary
Node.js engine version constraints
package.json, packages/cli-old/package.json, packages/create-proofkit/package.json, packages/fmdapi/package.json, packages/fmodata/package.json, packages/cli/template/vite-wv/package.json, .github/workflows/check-skills.yml, .github/workflows/validate-skills.yml, .changeset/node-engine-support.md, .changeset/quiet-command-parsing.md
All packages and workflows now enforce Node.js `^22.0.0
Shell-style command string parser
packages/cli/src/utils/projectFiles.ts
New parseCommandString function tokenizes command strings with support for single/double quotes and backslash escaping; WHITESPACE_REGEX added.
Node runtime version constant
packages/cli/src/consts.ts, packages/cli/src/core/planInit.ts
Introduces shared NODE_RUNTIME_VERSION constant set to `^22.0.0
CLI init & execute refactor
packages/cli/src/cli/init.ts, packages/cli/src/core/executeInitPlan.ts, packages/cli/src/helpers/intent.ts, packages/cli/src/helpers/ultracite.ts
Init and helper code now use parseCommandString to derive {command,args} for fix/lint/execute commands; executeInitPlan runs lint as a tolerated final step (logs “Lint did not succeed; continuing setup.” on failure) and preserves non-blocking behavior for fix with conditional debug logging.
Test updates
packages/cli/tests/executor.test.ts, packages/cli/tests/init-run-init-regression.test.ts, packages/cli/tests/init-scaffold-contract.test.ts, packages/cli/tests/integration.test.ts, packages/cli/tests/planner.test.ts, packages/cli/tests/test-layer.ts
Tests updated to expect pnpm lint step, to use NODE_RUNTIME_VERSION instead of hardcoded strings, to assert pnpm 10 workspace write ordering, and to make ProcessService.run failure simulation stricter.
Minor updates
packages/cli/template/vite-wv/src/routes/query-demo.tsx
React Query queryKey now uses as const to preserve literal tuple typing.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related PRs

  • proofsh/proofkit#263: Introduces Ultracite and TanStack Intent init steps touching the same intent/ultracite and init execution paths updated here.
  • proofsh/proofkit#264: Overlaps with command-parsing and init-flow updates that replace naive space-splitting with a parser in init and execute code.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title does not align with the primary objectives. While it mentions Ultracite and intent additions, the major changes involve Node engine version restrictions, command parsing improvements, and workflow updates—not just adding two features to the init flow. Consider a more comprehensive title like 'Restrict Node engines to 22/24/26 and add Ultracite/intent to init' to accurately reflect the scope of changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feature/init-ultracite-intent

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/cli/src/cli/init.ts (1)

448-455: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Lint command error handling differs from executeInitPlan.

In executeInitPlan.ts (lines 453-464), the lint command is wrapped with Effect.either and failures log a warning but continue setup. Here in init.ts, the lint command has no error handling and will throw on failure, creating inconsistent behavior between the two execution paths.

🔧 Align error handling with executeInitPlan
-    const [lintCommand, ...lintArgs] = parseCommandString(formatPackageManagerCommand(pkgManager, "lint"));
-    if (!lintCommand) {
-      throw new Error(`Unable to resolve lint command for ${pkgManager}.`);
-    }
-    await execa(lintCommand, lintArgs, {
-      cwd: projectDir,
-      stdio: "pipe",
-    });
+    const [lintCommand, ...lintArgs] = parseCommandString(formatPackageManagerCommand(pkgManager, "lint"));
+    if (!lintCommand) {
+      throw new Error(`Unable to resolve lint command for ${pkgManager}.`);
+    }
+    await execa(lintCommand, lintArgs, {
+      cwd: projectDir,
+      stdio: "pipe",
+    }).catch((error: unknown) => {
+      if (state.debug) {
+        console.log("Lint did not succeed; continuing setup.");
+        console.error(error);
+      }
+    });
🤖 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/cli/src/cli/init.ts` around lines 448 - 455, The lint execution in
init.ts uses execa directly (via parseCommandString/formatPackageManagerCommand)
and will throw on failure, unlike executeInitPlan.ts which wraps the lint step
with Effect.either and only logs a warning; change init.ts to match that
behavior by catching errors from the execa call (or using the same Effect.either
pattern) and logging a non-fatal warning instead of letting the error propagate,
keeping the rest of the initialization flow continuing; keep references to
parseCommandString, formatPackageManagerCommand and the execa invocation so the
replacement targets the same lintCommand/lintArgs execution site.
🧹 Nitpick comments (1)
packages/cli/src/cli/init.ts (1)

443-444: 💤 Low value

Replace console.log with proper logging service.

The coding guidelines state to remove console.log from production code. Even though these are gated behind state.debug, prefer using a proper logging abstraction for consistency.

📝 Suggested approach

If a debug logging method exists elsewhere in the codebase:

-      if (state.debug) {
-        console.log(`Fix command failed; continuing. packageManager=${pkgManager} command=${fixCommandString}`);
-        console.error(error);
-      }
+      if (state.debug) {
+        logger.debug(`Fix command failed; continuing. packageManager=${pkgManager} command=${fixCommandString}`, error);
+      }

Otherwise, document why direct console usage is acceptable in debug mode.

🤖 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/cli/src/cli/init.ts` around lines 443 - 444, Replace the direct
console calls in the failure path with the project's logging abstraction:
instead of console.log and console.error in the block that prints "Fix command
failed; continuing. packageManager=${pkgManager} command=${fixCommandString}",
call the appropriate logger (e.g., logger.debug or logger.error) so the message
respects state.debug and centralized logging; pass contextual fields pkgManager
and fixCommandString and include the error object when logging the failure. If
no logger exists in this module, import or create the shared CLI logger used
elsewhere, and ensure the debug-level message is gated by state.debug via the
logger rather than console.
🤖 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/cli/src/consts.ts`:
- Line 10: NODE_RUNTIME_VERSION is currently set to "^24.11.0", which restricts
generated projects to Node 24.x; change the export const NODE_RUNTIME_VERSION to
the multi-version range "^22.0.0 || ^24.0.0 || ^26.0.0" so that engines.node and
devEngines.runtime.version in scaffolded projects support Node 22, 24, and 26
(update the NODE_RUNTIME_VERSION constant in consts.ts accordingly).

In `@packages/cli/src/core/executeInitPlan.ts`:
- Around line 440-441: The comment above the lint/runFix block is inaccurate: it
says "lint errors still propagate below" but the code uses Effect.either around
the lint command and logs a warning on failure (so lint errors are tolerated);
update the comment near plan.tasks.runFix / getPackageScriptCommand /
processService.run / Effect.either to state that lint failures are caught and
only logged as warnings (non-blocking), while other errors still propagate as
intended.

In `@packages/cli/src/utils/projectFiles.ts`:
- Line 58: Add an explicit return type annotation to the exported function
parseCommandString so the signature clearly declares the function's return type;
update the function declaration in packages/cli/src/utils/projectFiles.ts to
include the precise return type that matches its implementation (for example
string, string[], or a specific ParsedCommand type/interface) and adjust or
export any related types if needed to keep type compatibility.

In `@packages/cli/template/vite-wv/package.json`:
- Around line 6-8: The engines field in the package.json template currently pins
"node": ">=20.11.0", which is inconsistent with the monorepo; update the
"engines" -> "node" value in packages/cli/template/vite-wv/package.json to match
the repo constraint by setting it to "^22.0.0 || ^24.0.0 || ^26.0.0" so
scaffolded projects require the same Node ranges as the CLI and other packages.

---

Outside diff comments:
In `@packages/cli/src/cli/init.ts`:
- Around line 448-455: The lint execution in init.ts uses execa directly (via
parseCommandString/formatPackageManagerCommand) and will throw on failure,
unlike executeInitPlan.ts which wraps the lint step with Effect.either and only
logs a warning; change init.ts to match that behavior by catching errors from
the execa call (or using the same Effect.either pattern) and logging a non-fatal
warning instead of letting the error propagate, keeping the rest of the
initialization flow continuing; keep references to parseCommandString,
formatPackageManagerCommand and the execa invocation so the replacement targets
the same lintCommand/lintArgs execution site.

---

Nitpick comments:
In `@packages/cli/src/cli/init.ts`:
- Around line 443-444: Replace the direct console calls in the failure path with
the project's logging abstraction: instead of console.log and console.error in
the block that prints "Fix command failed; continuing.
packageManager=${pkgManager} command=${fixCommandString}", call the appropriate
logger (e.g., logger.debug or logger.error) so the message respects state.debug
and centralized logging; pass contextual fields pkgManager and fixCommandString
and include the error object when logging the failure. If no logger exists in
this module, import or create the shared CLI logger used elsewhere, and ensure
the debug-level message is gated by state.debug via the logger rather than
console.
🪄 Autofix (Beta)

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

Run ID: 173d35b6-4425-419a-9d33-8733b74051d1

📥 Commits

Reviewing files that changed from the base of the PR and between e0694fe and b99163f.

📒 Files selected for processing (24)
  • .changeset/node-engine-support.md
  • .changeset/quiet-command-parsing.md
  • .github/workflows/check-skills.yml
  • .github/workflows/validate-skills.yml
  • package.json
  • packages/cli-old/package.json
  • packages/cli/src/cli/init.ts
  • packages/cli/src/consts.ts
  • packages/cli/src/core/executeInitPlan.ts
  • packages/cli/src/core/planInit.ts
  • packages/cli/src/helpers/intent.ts
  • packages/cli/src/helpers/ultracite.ts
  • packages/cli/src/utils/projectFiles.ts
  • packages/cli/template/vite-wv/package.json
  • packages/cli/template/vite-wv/src/routes/query-demo.tsx
  • packages/cli/tests/executor.test.ts
  • packages/cli/tests/init-run-init-regression.test.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/tests/integration.test.ts
  • packages/cli/tests/planner.test.ts
  • packages/cli/tests/test-layer.ts
  • packages/create-proofkit/package.json
  • packages/fmdapi/package.json
  • packages/fmodata/package.json

Comment thread packages/cli/src/consts.ts Outdated
Comment thread packages/cli/src/core/executeInitPlan.ts Outdated
Comment thread packages/cli/src/utils/projectFiles.ts Outdated
Comment thread packages/cli/template/vite-wv/package.json
eluce2 added 2 commits May 15, 2026 09:45
- parse package-manager commands safely
- fix lint step handling in init flow
- raise Node engine ranges to 22/24/26
- warn on lint failure during init
- accept Node 22/24/26 in CLI and template
- add parseCommandString return type
@eluce2 eluce2 force-pushed the feature/init-ultracite-intent branch from 7559304 to 03a7538 Compare May 15, 2026 14:45
@eluce2 eluce2 merged commit 63ecc65 into main May 15, 2026
1 of 2 checks passed
@eluce2 eluce2 deleted the feature/init-ultracite-intent branch May 15, 2026 14:46
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