Skip to content

feat: deprecate Slice Machine and redirect to the Prismic CLI - #1779

Merged
angeloashmore merged 18 commits into
mainfrom
claude/slice-machine-deprecation-plan-2hfx4v
Sep 17, 2026
Merged

angeloashmore merged 18 commits into
mainfrom
claude/slice-machine-deprecation-plan-2hfx4v

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Sep 16, 2026

Copy link
Copy Markdown
Member

Resolves: Slice Machine Deprecation Steps

Description

Before this PR, npx @slicemachine/init created new Slice Machine projects, and AI agents trained before the Prismic CLI existed still reach for it.

After this PR, every Slice Machine package says it is deprecated and points to the Prismic CLI and the Type Builder. Creating a new project stops unless someone deliberately chooses Slice Machine. Existing projects keep working, with a notice they can turn off.

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

$ npx @slicemachine/init --repository my-repo
Slice Machine is deprecated. The @slicemachine/init command is replaced by prismic init, which models content in the Type Builder:

  npx prismic init --repo my-repo

--force sets up a project with the deprecated Slice Machine. It is not recommended:

  npx @slicemachine/init --repository my-repo --force

Working with an AI agent? Install the Prismic skill so it knows the current workflow:

  npx skills add --global --yes prismicio/skills

Docs: https://prismic.io/docs/cli
Existing Slice Machine projects: https://prismic.io/docs/slice-machine
$ npx @slicemachine/init --repository my-repo --force
Slice Machine is deprecated. Continuing because --force was passed.

The @slicemachine/init command is replaced by prismic init, which models content in the Type Builder:

  npx prismic init --repo my-repo

Docs: https://prismic.io/docs/cli

? Which framework do you want to use? …
$ npx start-slicemachine
Slice Machine is deprecated. This project still works, but Slice Machine is no longer updated.

New projects use the Type Builder, and this project can move to it with the Prismic CLI:

  npx prismic init

Working with an AI agent? Install the Prismic skill so it knows the current workflow:

  npx skills add --global --yes prismicio/skills

Docs: https://prismic.io/docs/slice-machine#migrate-to-the-type-builder
Set PRISMIC_IGNORE_SLICE_MACHINE_DEPRECATION=1 to hide this notice.

Slice Machine started at http://localhost:9999

How to QA 1

Run yarn build-essential, then node packages/init/bin/slicemachine-init.js --help. The message prints and the exit code is 1. Run yarn workspace @slicemachine/init build, then node packages/init/bin/slicemachine-init.js --force --version. The notice prints, then the version. Run yarn workspace start-slicemachine build, then node packages/start-slicemachine/bin/start-slicemachine.js --version. The notice prints, then the version. Run it again with PRISMIC_IGNORE_SLICE_MACHINE_DEPRECATION=1 and only the version prints.

🤖 Generated with Claude Code

https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Slice Machine is replaced by the Prismic CLI and the Type Builder. Agents
and users still reach for it through npm, so every package now redirects
them at the moment they touch it.

`@slicemachine/init` prints the redirect message on every run, including
`--help` and `--version`, tracks one halt event, and exits with code 1.
There is no flag to continue. The rest of the package stays as dead code.
When init was given a repository name, the suggested command carries it
as `npx prismic init --repo <name>`.

`start-slicemachine` prints a notice to stderr before every command, then
runs as normal. Both bins go through the same entry, so `npm run
slicemachine` shows it too.

Every package README gets the deprecation note above the title so npm
renders it. A new `deprecate` workflow lets maintainers deprecate every
version of every package on npm with the CI token.

The playground script starts init through the library entry, because the
bin no longer initializes projects.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
@angeloashmore
angeloashmore requested a review from a team as a code owner September 16, 2026 21:47
@angeloashmore
angeloashmore requested review from levimykel and removed request for a team September 16, 2026 21:47
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
slice-machine Ready Ready Preview Sep 17, 2026 10:27pm UTC

Request Review

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/init/test/bin.test.ts
The manager reads the project `.prismicrc` from the nearest
`package.json`, not from the working directory, so the fixture did not
apply and the tests sent events to Segment. The user-level file is read
from `XDG_CONFIG_HOME`, which the tests now point at the fixture.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The bin reads its flag with Node's parseArgs and its package data with
require. The deprecate workflow loop and the comments are shorter.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
Deprecation on npm runs from a maintainer's machine instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The note used tilde fences. Backtick fences are the common form and match the rest of the README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp

@lihbr lihbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGMT but an important suggestion, see below

Comment thread packages/init/bin/slicemachine-init.js Outdated
Slice Machine is deprecated, but the new workflow is not ready for every
project. The message now names the Prismic CLI as the recommended path and
tells the developer how to continue with Slice Machine if they want it.

`--force` continues the run. The message says the choice belongs to the
developer and tells an AI agent not to add the flag on its own.

Telemetry records one event for both outcomes so the team can see how many
runs continue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The line spoke to AI agents directly, which read oddly to a person. It now
describes the choice itself, which covers a developer setting up a project
for a client and an agent working on someone's behalf.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 977011e. Configure here.

Comment thread packages/init/bin/slicemachine-init.js Outdated
`--force=true` parses as a string, so it fell through to the halt message
even though the user asked to continue. Both spellings now continue, and
both are hidden from the CLI, which rejects flags it does not know.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The message opened by describing what Slice Machine is not. It now states
what to use for new projects, and the rest is shorter so the commands stand
out. The forced run says the same thing in three lines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
"If this project is for someone else" reads as a third party, so an agent
working for a developer could exclude itself. The line now turns on who runs
the command, which covers an agent and a contractor alike.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
"The project owner's call" reads like policy, not like something a developer
wants in a terminal. One sentence now carries the point, and it still tells
an agent to check with the person who asked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The message told the reader who should decide. It now says what the flag
does and that it is not recommended, which is the fact a developer or an
agent needs to act on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The force line carries the recommendation now, so the first line can
describe Slice Machine instead of directing the reader. The Type Builder
still arrives before any command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The message described Slice Machine in general, so the reader had to infer
which command to run. It now says @slicemachine/init is replaced by prismic
init, then shows that command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The message had been cut down to fragments. It reads in full sentences
again, names the command that replaces this one, and says plainly that
--force is not recommended.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The notice prints on every start, which wears on a project that has read it
and decided to stay for now. Setting
PRISMIC_IGNORE_SLICE_MACHINE_DEPRECATION hides it. The README says so; the
notice itself does not, so an agent reading stderr is not handed the switch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
The notice used a compressed style while the init message uses full
sentences with the commands set apart. It now reads the same way, and it
names the variable that hides it so a project that has read it once can move
on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
A forced run does not await the telemetry call so the command is not
delayed. That left the rejection unhandled, and Node exits with code 1 on an
unhandled rejection, which failed the run and the playground script with it.
The call now handles its own rejection.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154ki8C9BX9VcoQFgARKJFp
@angeloashmore
angeloashmore merged commit 815f46d into main Sep 17, 2026
33 of 35 checks passed
@angeloashmore
angeloashmore deleted the claude/slice-machine-deprecation-plan-2hfx4v branch September 17, 2026 22:48
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.

3 participants