Skip to content

feat(init): remove --prompt and bundled agent prompt templates#241

Open
rafa-thayto wants to merge 3 commits intomainfrom
rafa-thayto/remove-init-prompts
Open

feat(init): remove --prompt and bundled agent prompt templates#241
rafa-thayto wants to merge 3 commits intomainfrom
rafa-thayto/remove-init-prompts

Conversation

@rafa-thayto
Copy link
Copy Markdown
Contributor

@rafa-thayto rafa-thayto commented Apr 28, 2026

Summary

  • Remove the clerk init --prompt flag and the per-framework prompt templates that lived in packages/cli-core/src/commands/init/prompts/. Agents should now run clerk init -y for the full non-interactive flow, or install the published skills directly via skills add clerk/skills.
  • Move the small pmInstallCommand helper to lib/package-manager.ts (it lived next to the prompt templates only because they referenced it; its only other consumer was init/heuristics.ts).
  • Lift the declare module "*.md" text-import declaration from the deleted prompts/md.d.ts into globals.d.ts so skills.ts and skill/install.ts keep type-checking.
  • Tests that previously used init --prompt as a non-side-effecting smoke test for --input-json and --app registration are rewritten to assert via clerk.raw (no unknown option in stderr / structured agent error format) without depending on the removed flag.
  • Init README.md, the cli-program.ts examples, and the scaffold.ts doc comment are updated to drop --prompt references.

Versioning

Released as a minor bump rather than major--prompt had no known users, so the removal is treated as additive cleanup rather than a breaking change.

Test plan

  • bun run format:check
  • bun run lint
  • bun run typecheck
  • bun run test (93 passed)
  • bun run test:e2e:op

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: 5b13001

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

This PR includes changesets to release 1 package
Name Type
clerk Minor

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

@rafa-thayto rafa-thayto changed the title feat(init)!: remove --prompt and bundled agent prompt templates feat(init): remove --prompt and bundled agent prompt templates Apr 28, 2026
@rafa-thayto rafa-thayto force-pushed the rafa-thayto/remove-init-prompts branch from e44d1fe to 88c3754 Compare April 28, 2026 15:35
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@rafa-thayto has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 3 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0ccab3a0-3888-4fdb-b226-c1d89c9a8484

📥 Commits

Reviewing files that changed from the base of the PR and between 4d79e26 and cc648ad.

📒 Files selected for processing (28)
  • .changeset/remove-init-prompts.md
  • packages/cli-core/src/cli-program.ts
  • packages/cli-core/src/commands/init/README.md
  • packages/cli-core/src/commands/init/heuristics.ts
  • packages/cli-core/src/commands/init/index.test.ts
  • packages/cli-core/src/commands/init/index.ts
  • packages/cli-core/src/commands/init/prompts/astro.md
  • packages/cli-core/src/commands/init/prompts/expo.md
  • packages/cli-core/src/commands/init/prompts/express.md
  • packages/cli-core/src/commands/init/prompts/fastify.md
  • packages/cli-core/src/commands/init/prompts/generic-fallback.md
  • packages/cli-core/src/commands/init/prompts/generic.md
  • packages/cli-core/src/commands/init/prompts/index.ts
  • packages/cli-core/src/commands/init/prompts/md.d.ts
  • packages/cli-core/src/commands/init/prompts/nextjs-app-router.md
  • packages/cli-core/src/commands/init/prompts/nextjs-pages-router.md
  • packages/cli-core/src/commands/init/prompts/nuxt.md
  • packages/cli-core/src/commands/init/prompts/react-router.md
  • packages/cli-core/src/commands/init/prompts/react.md
  • packages/cli-core/src/commands/init/prompts/tanstack-start.md
  • packages/cli-core/src/commands/init/prompts/vue.md
  • packages/cli-core/src/commands/init/scaffold.ts
  • packages/cli-core/src/globals.d.ts
  • packages/cli-core/src/lib/installer.ts
  • packages/cli-core/src/lib/package-manager.ts
  • packages/cli-core/src/test/integration/agent-mode.test.ts
  • packages/cli-core/src/test/integration/init-options.test.ts
  • packages/cli-core/src/test/integration/input-json.test.ts
📝 Walkthrough

Walkthrough

The pull request removes the interactive clerk init --prompt command mode and all associated per-framework agent prompt templates. Changes include deletion of 13 framework-specific .md prompt files, removal of the --prompt flag from the CLI program definition, removal of the prompt?: boolean field from the InitOptions type, relocation of pmInstallCommand from the prompts module to lib/package-manager.ts, updates to relevant documentation and tests, and migration of the TypeScript .md module declaration from a prompts-specific file to globals.d.ts. Users are directed to use non-interactive clerk init -y or to run skills add clerk/skills directly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.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.
Title check ✅ Passed The title accurately summarizes the main changes: removal of the --prompt flag and bundled agent prompt templates from the init command.
Description check ✅ Passed The pull request description clearly relates to the changeset: it documents the removal of --prompt flag and prompt templates, the relocation of pmInstallCommand, TypeScript module declaration changes, and test updates.

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


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
Review rate limit: 0/1 reviews remaining, refill in 56 minutes and 3 seconds.

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

Comment thread packages/cli-core/src/lib/package-manager.ts
Comment thread packages/cli-core/src/globals.d.ts
@rafa-thayto rafa-thayto requested a review from wyattjoh April 29, 2026 20:48
The `clerk init --prompt` short-circuit and the per-framework prompt
templates under `commands/init/prompts/` are removed. Agents should run
`clerk init -y` for non-interactive setup, or install the published
skills directly via `skills add clerk/skills`.

Move the `pmInstallCommand` helper to `lib/package-manager.ts` (its only
non-prompt consumer was `init/heuristics.ts`) and lift the `*.md` text
import declaration to `globals.d.ts` so `skills.ts` and
`skill/install.ts` keep compiling.
- Remove unnecessary `declare module "*.md"` from globals.d.ts — the
  prompt .md files that needed it were deleted, and remaining .md imports
  use `with { type: "text" }` import attributes instead.

- Consolidate install-command logic: `globalInstallCommand` in
  installer.ts now reuses `pmInstallCommand` from package-manager.ts for
  bun/pnpm/npm, keeping the PM-to-command mapping in a single place.
The ambient module declaration for `*.md` files was incorrectly removed
in the previous commit. It's still needed because `skill/install.ts`
imports `.md` files — while the `with { type: "text" }` attribute tells
Bun how to load them at runtime, TypeScript still requires the ambient
declaration for type resolution.
@rafa-thayto rafa-thayto force-pushed the rafa-thayto/remove-init-prompts branch from 5b13001 to cc648ad Compare April 29, 2026 20:50
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.

2 participants