Skip to content

fix: install and verify claude code plugins in devai:install - #651

Merged
markshust merged 3 commits into
developfrom
feature/devai-install-plugins
Nov 1, 2026
Merged

markshust merged 3 commits into
developfrom
feature/devai-install-plugins

Conversation

@markshust

Copy link
Copy Markdown
Collaborator

Summary

devai:install only wrote .claude/settings.json and counted on Claude Code's one-time folder-trust prompt to install marko-skills, marko-lsp and marko-mcp. If that prompt was skipped or failed, the plugins stayed enabled but not installed, and nothing reported an error: no MCP server, no LSP diagnostics, no skills.

Code (marko/devai)

  • For external projects (GitHub marketplace source), ClaudeCodeAgent::install() now runs claude plugin install <name>@marko --scope project for all three plugins through CommandRunnerInterface. It runs after the settings are written, so the CLI can resolve the marko marketplace from extraKnownMarketplaces.
  • The CLI rewrites .claude/settings.json on every project-scope install, so devai writes its own settings back afterwards. The file's output stays the same as before.
  • It verifies with claude plugin list --json. A plugin counts only if it is listed with enabled: true, because the list also includes project-scope installs from other folders with enabled: false. If any plugin is missing, or the list command fails, it throws DevAiInstallException::claudePluginsNotInstalled(). The suggestion lists the three install commands and says to restart Claude Code.
  • If the claude CLI isn't on PATH, there's no throw. The agent records a notice, and the orchestrator logs it as [claude-code] WARNING: … in the install summary. This works through a new ReportsInstallNoticesInterface, which the orchestrator checks with instanceof. ClaudeCodeAgent is no longer a readonly class so it can hold the notices; its promoted properties stay readonly.
  • Monorepo (local marketplace, source path .): no change. Installation is still left to the trust prompt.
  • Intelephense setup now runs before the plugin step, so a verification failure doesn't skip it.

Docs

  • The auto-install wording is now conditional in agents/claude-code.md, lsp.md, the CLAUDE.md template in buildClaudeMd(), the claude-plugins README and the marketplace_ref config row in packages/devai.md. claude-code.md has a new "Plugin installation" section.
  • New troubleshooting entry: "Marko MCP, LSP or skills missing even though settings enable them". It explains how to check (claude plugin list / claude mcp list), fix (the three install commands) and restart.
  • The /mcp server name is now plugin:marko-mcp:marko in Manual verification and in the verification checklist.
  • The CLAUDE.md template's line about the symbol index auto-rebuilding is unchanged.

Tests

  • ClaudeCodeAgentTest: install commands and their order, settings written before install, settings rewritten after the CLI changes them, verification via plugin list --json, a loud failure that names the missing plugin and gives the full suggestion, listed-but-disabled counts as missing, a failing plugin list, a warning (no throw) when claude is off PATH, and the monorepo skipping the install.
  • ClaudeCodeInstallExternalProjectTest: the fake runners now answer claude plugin list. New end-to-end cases cover install and verify, the loud failure, and the warning in the summary log.

composer test, ./vendor/bin/phpcs, composer phpstan and composer docs:lint all pass.

Closes #648

🤖 Generated with Claude Code

https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX

devai:install only wrote .claude/settings.json and relied on Claude Code's
one-time folder-trust prompt to install marko-skills, marko-lsp and marko-mcp.
When that prompt was skipped or failed, the plugins stayed enabled but not
installed, and nothing reported an error.

For external projects, ClaudeCodeAgent now runs
`claude plugin install <name>@marko --scope project` for all three plugins,
writes its settings back afterwards (the CLI rewrites the file), and verifies
with `claude plugin list --json`. A missing plugin throws
DevAiInstallException with the three install commands and a restart hint. If
the claude CLI is not on PATH, the install logs a warning instead. The
monorepo's local marketplace is still left to the trust prompt.

Docs: auto-install wording is now conditional, troubleshooting has an entry
for enabled-but-not-installed plugins, and the /mcp server name is
plugin:marko-mcp:marko.

Closes #648

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX
@github-actions github-actions Bot added the bug Something isn't working label Nov 1, 2026
markshust and others added 2 commits November 1, 2026 11:44
claude plugin install does not read extraKnownMarketplaces, so on a machine
that has never seen the marko marketplace every install failed with
"not found in marketplace". Verified against a fresh CLAUDE_CONFIG_DIR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX
@markshust
markshust merged commit 88fc661 into develop Nov 1, 2026
4 checks passed
@markshust
markshust deleted the feature/devai-install-plugins branch November 1, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

devai: Claude Code plugins can end up enabled but never installed, so MCP/LSP/skills go missing without any error

1 participant