docs(claude-code): install-first plugin page behind default-on flag - #646
docs(claude-code): install-first plugin page behind default-on flag#646eshwar-sundar-glean wants to merge 1 commit into
Conversation
Rework the Claude Code plugin guide: a "What's included" blurb, an install-first flow (marketplace add + install, then `/glean_run setup my Glean`), and an optional USE_CLAUDE_PROJECT_DIR note for fewer skill-file permission prompts. The new page renders by default behind the `claude-code-plugin-v2` feature flag; the previous page is preserved as the fallback and shows whenever the flag is turned off. - docs/guides/mcp/claude-code.mdx: new page (FeatureFlag children) + old page (fallback) - src/lib/defaultFlags.ts: DEFAULT_FLAGS base so a flag can ship enabled by default (merged beneath env + Edge Config; either can override) - src/utils/buildTimeFlags.ts, src/theme/Root.tsx: merge DEFAULT_FLAGS as the base at build and runtime - src/components/PluginPage: optional whatsIncluded + afterSteps slots
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hold merge until Plugin launch |
| }, | ||
| ]} | ||
| /> | ||
| {/* New page is gated behind `claude-code-plugin-v2` (enabled by default via |
There was a problem hiding this comment.
3/5 (strong opinion: non-blocking)
The feature flag is defaulted to off. This PR can merge with it off, and we can turn it on when we want to release. We should update this comment to match.
| // Seed the default-on flags first so env overrides (FF_* / FEATURE_FLAGS_JSON) | ||
| // can still turn them off, but they default on when nothing is set. |
There was a problem hiding this comment.
3/5 (strong opinion: non-blocking)
We probably don't need these comments.
There was a problem hiding this comment.
4/5 (serious issue: blocking)
Can we revert the changes to this file. I don't want there to be separate ways that feature flags are served to the site.
There was a problem hiding this comment.
4/5 (serious issue: blocking)
Can we remove this. I don't want there to be multiple places where feature flags are defined.
| description: | ||
| 'Connect the plugin to your Glean instance. You only need to do this once per machine.', | ||
| items: [ | ||
| 'In Claude Code, run: /glean_run setup my Glean', |
There was a problem hiding this comment.
3/5 (strong opinion: non-blocking)
| 'In Claude Code, run: /glean_run setup my Glean', | |
| 'In Claude Code, run: `/glean_run setup my Glean`', |
| }, | ||
| { | ||
| type: 'list', | ||
| label: '/glean_run setup my Glean', |
There was a problem hiding this comment.
3/5 (strong opinion: non-blocking)
| label: '/glean_run setup my Glean', | |
| label: 'Setup the Glean MCP connection', |
There was a problem hiding this comment.
Curious if you folks considered a simpler /glean command instead of /glean_run, @eshwar-sundar-glean.
There was a problem hiding this comment.
/glean_run is cool, no? :D
| items: [ | ||
| 'In Claude Code, run: /glean_run setup my Glean', | ||
| 'Enter your work email when prompted.', | ||
| 'Finish sign-in in the browser window that opens (Glean OAuth) and approve access.', |
There was a problem hiding this comment.
4/5 (serious issue: blocking)
This assumes OAuth, and doesn't call out that you can use a token instead. Can we match this prose with what we had on the page already?
Authentication uses Glean's OAuth server where enabled, or a Glean API token as a fallback.
Does setup account for non-OAuth setup?
| and permission guardrails fully enforced, all running through a local | ||
| Glean MCP server so it works as native skills and tools right in your | ||
| terminal.{' '} |
There was a problem hiding this comment.
3/5 (strong opinion: non-blocking)
I don't think it's necessary to call out that it uses a local MCP server. In fact, we should avoid it.
| and permission guardrails fully enforced, all running through a local | |
| Glean MCP server so it works as native skills and tools right in your | |
| terminal.{' '} | |
| and permission guardrails fully enforced, all running through a | |
| Glean MCP server so it works right in your | |
| terminal.{' '} |
What & why
Reworks the Claude Code plugin guide (
/guides/mcp/claude-code) into an install-first page, and ships it behind a feature flag that is enabled by default. The previous page is preserved and renders as the fallback whenever the flag is turned off.The new page:
claude-pluginsREADME for the full list./glean_run setup my Gleanwith concise setup steps.USE_CLAUDE_PROJECT_DIR=1under theenvkey of a Claude Codesettings.json, the project/local/managed scopes, and the matching.gitignoreentry (the cache is written to.claude/tmp/in the repo).Feature flag (default-on)
The repo's convention is that flags are missing → off (flipped on via Vercel Edge Config). To make the new page default-on purely in-repo, this PR adds a small
DEFAULT_FLAGSbase that is merged beneath env flags and the runtime Edge Config response, so the flag stays on unless a later source turns it off (Edge Config can still act as a kill switch).src/lib/defaultFlags.ts— new:claude-code-plugin-v2: { enabled: true }.src/utils/buildTimeFlags.ts— seedDEFAULT_FLAGSinto the build snapshot.src/theme/Root.tsx— mergeDEFAULT_FLAGSas the base at build and runtime (survives the runtime replace).src/components/PluginPage/*— non-breaking optionalwhatsIncluded+afterStepsslots (other plugin pages unaffected).docs/guides/mcp/claude-code.mdx— new page as<FeatureFlag>children, old page as thefallback.👀 Reviewer callouts
DEFAULT_FLAGSchanges site-wide flag resolution (adds a base layer). It's additive and scoped to entries in that file, but please confirm you're comfortable with default-on-in-code vs. enabling via Edge Config (which would keep this PR pure doc content).Test plan
pnpm build✅ (328 docs) ·pnpm test✅ (169 passed) ·pnpm prettier --checkon changed files ✅ (.mdxis prettier-ignored per repo config)./glean_run setup my Glean, "What's included",USE_CLAUDE_PROJECT_DIR, settings.json +.gitignoresnippets); old markers absent.FF_CLAUDE_CODE_PLUGIN_V2=false pnpm build): old page renders ("Open MCP Configurator", "Set up the Glean MCP Server"); new markers absent — confirming both pages coexist.Preview
Run
pnpm docusaurus startand open/guides/mcp/claude-code. To preview the old page: append?ff_claude-code-plugin-v2=false.