Skip to content

Add plugin compatibility checks to forge doctor (Claude & Codex)#39

Merged
CodeWithJuber merged 1 commit into
masterfrom
codex/check-plugin-compatibility-and-conflicts
Jul 8, 2026
Merged

Add plugin compatibility checks to forge doctor (Claude & Codex)#39
CodeWithJuber merged 1 commit into
masterfrom
codex/check-plugin-compatibility-and-conflicts

Conversation

@CodeWithJuber

Copy link
Copy Markdown
Owner

Motivation

  • Ensure Forge's hook manifests play nicely with other plugins by detecting missing or non-executable guard scripts referenced from plugin hook manifests.
  • Surface repo-level plugin manifest issues early so multiple plugins can coexist without silent degradation.
  • Provide an automated doctor check so CI/maintainers can detect compatibility regressions before runtime.

Description

  • Add commandScriptFromPluginRoot and checkPluginCompatibility in src/doctor.js which read .claude-plugin/plugin.json and the referenced hooks manifest, extract hook commands, and verify referenced guard scripts exist and are executable.
  • Add Codex manifest checks that validate skills and mcpServers paths and ensure the Codex plugin manifest looks installable beside other plugins.
  • Wire the new compatibility checks into the doctor flow by calling checkPluginCompatibility(results) from doctor().
  • Add a unit test in test/doctor.test.js that asserts the new doctor checks run and report the expected OK notes for Claude and Codex plugin manifests.

Testing

  • Ran unit tests with npm test (all tests passed).
  • Ran the scoped doctor tests with node --test test/doctor.test.js (passed) and confirmed doctor() prints the new compatibility results via node src/cli.js doctor.
  • Ran npx biome format/npx biome check on the modified files and fixed format/lint findings for the new code; note that a full npm run check initially surfaced unrelated repo-wide Biome diagnostics unrelated to this change but the scoped checks for the modified files passed.

Codex Task

@CodeWithJuber CodeWithJuber merged commit 0d46cba into master Jul 8, 2026
9 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3f3e3bbb6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/doctor.js
Comment on lines +149 to +150
const rel = commandScriptFromPluginRoot(command);
if (!rel) continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Warn on unparsed plugin hook commands

When a hook command does not exactly contain the quoted ${CLAUDE_PLUGIN_ROOT} marker—for example an older bash $FORGE_HOME/guards/foo.sh hook or a valid unquoted ${CLAUDE_PLUGIN_ROOT}/global/guards/foo.sh—this branch silently skips validation, but the later success path still says every command is local/executable. In that stale-manifest case forge doctor reports OK instead of surfacing the missing/non-self-contained hook, which is the compatibility failure this check is meant to catch.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant