feat: support Slice Machine projects#84
Merged
angeloashmore merged 4 commits intomainfrom Apr 2, 2026
Merged
Conversation
Support Slice Machine projects by reading legacy auth format (cookies/base) from ~/.prismic and falling back to slicemachine.config.json for repository name resolution. Gate init and sync commands behind a Type Builder feature flag to direct users to Slice Machine when their repository hasn't been upgraded yet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix stale token after login in init, cookie value truncation with `=` chars, empty host string fallback using `||`, and config error propagation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ling Use PRISMIC_TYPE_BUILDER_ENABLED env var instead of TEST to control the Type Builder gate, allowing explicit testing of both enabled and disabled states. Fix whoami Slice Machine auth test to use login fixture for token instead of env var. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
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.

Resolves: https://prismic-team.slack.com/archives/C02L3FN3AJK/p1775006811713959
Description
Make the CLI compatible with all Slice Machine repositories, not just those using the Type Builder. This lets users and AI agents benefit from the CLI immediately rather than waiting for the Type Builder rollout to reach their repository.
Non-modeling commands (e.g.
init,sync) will work with any Slice Machine project. Modeling commands still require the Type Builder. Users whose repositories haven't been upgraded are given a clear message directing them to continue using Slice Machine.Checklist
Preview
How to QA 1
🤖 Generated with Claude Code
Note
Medium Risk
Introduces new auth parsing/writing behavior and new remote feature-flag/repository checks that can block
init/sync, so failures or API/flag issues could impact core CLI workflows.Overview
Adds Slice Machine compatibility by teaching
authto read/write Slice Machine-style.prismicfiles (base/cookies) when aslicemachine.config.jsonis present, and by falling back to legacy config to derive the repository name.Gates
prismic initandprismic syncbehind a newcheckIsTypeBuilderEnabledcheck (Amplitude flag + repository quota, overridable viaPRISMIC_TYPE_BUILDER_ENABLED), with a dedicatedTypeBuilderRequiredErrormessage surfaced in the CLI.Introduces a new
getRepositoryclient plus anamplitudeflag-evaluation helper, and updates E2E tests to cover the new gating and Slice Machine auth format.Written by Cursor Bugbot for commit 0e1fab2. This will update automatically on new commits. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩