Skip to content

Remove feature flag from AI instructions install in CLI - #2886

Merged
fredrikekelund merged 3 commits into
trunkfrom
remove-feature-flag-ai-instructions-cli
Mar 24, 2026
Merged

Remove feature flag from AI instructions install in CLI#2886
fredrikekelund merged 3 commits into
trunkfrom
remove-feature-flag-ai-instructions-cli

Conversation

@sejas

@sejas sejas commented Mar 24, 2026

Copy link
Copy Markdown
Member

Related issues

How AI was used in this PR

Claude identified that the desktop app already installs AI instructions without a feature flag, while the CLI path was still gated behind ENABLE_AGENT_SUITE. The change was pair-programmed with Claude.

Proposed Changes

  • Remove the ENABLE_AGENT_SUITE feature flag wrapping installAiInstructionsToSite() in the CLI site create command
  • AI instructions (AGENTS.md, CLAUDE.md, STUDIO.md) are now installed unconditionally when creating a site via CLI, or the desktop app.

Testing Instructions

From CLI

  • Build the CLI: npm run cli:build
  • Create a new site via CLI without setting ENABLE_AGENT_SUITE: node apps/cli/dist/cli/main.js site create /tmp/test-site
  • Verify that AGENTS.md, CLAUDE.md, and STUDIO.md exist in the site root

From Desktop

  • Run npm start
  • Create a new site
  • Verify that AGENTS.md, CLAUDE.md, and STUDIO.md exist in the site root
add-agents-md-from-studio-cli.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
The desktop app already calls installAiInstructionsToSite without a
feature flag. Align the CLI path so AI instructions (AGENTS.md, etc.)
are installed unconditionally when creating a site via CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sejas sejas self-assigned this Mar 24, 2026
Site creation in the desktop app goes through SiteServer.create() which
calls createSiteViaCli() internally. The CLI create command already
installs AI instructions, so the separate call in ipc-handlers was
redundant and would install instructions twice.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sejas
sejas requested a review from a team March 24, 2026 14:04
@sejas
sejas marked this pull request as ready for review March 24, 2026 14:04
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 36d38d8 vs trunk

app-size

Metric trunk 36d38d8 Diff Change
App Size (Mac) 1246.65 MB 1246.65 MB 0.00 MB ⚪ 0.0%

site-editor

Metric trunk 36d38d8 Diff Change
load 1901 ms 1919 ms +18 ms ⚪ 0.0%

site-startup

Metric trunk 36d38d8 Diff Change
siteCreation 8161 ms 8216 ms +55 ms 🔴 0.7%
siteStartup 4822 ms 3944 ms 878 ms 🟢 -18.2%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@sejas

sejas commented Mar 24, 2026

Copy link
Copy Markdown
Member Author

I created another PR that would be great to include #2889 , it keeps updated STUDIO.md when site starts from CLI.

@fredrikekelund fredrikekelund left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great 👍 Thanks, @sejas. Works as expected

@fredrikekelund
fredrikekelund merged commit a29cfb9 into trunk Mar 24, 2026
14 checks passed
@fredrikekelund
fredrikekelund deleted the remove-feature-flag-ai-instructions-cli branch March 24, 2026 15:55

@epeicher epeicher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @sejas! I have tested it, and I can confirm that without the environment variable, the expected files are added to the site.

CLI Using the UI
Image Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants