feat: add Factory Droid plugin support#1137
Conversation
|
Thanks for the contribution! I'm going to need to test it out, but at first blush, this looks like the right shape for a harness-adding PR. |
|
Hi! I just signed up for Factory to be able to test this and, at least in their CLI, I was 100% able to install the native superpowers claude code plugin in Factory with zero hiccups. It appears to have..just worked? @Skyline-9 can you tell me more about how it fails when you try to use it? |
10bb192 to
24e0b99
Compare
|
Hi @obra! I actually just retested on a newer version of droid and it works out of the box. I swear it was not like this in the older CLI, but great to know that it works out of the box, I just updated the PR to mention how to install it out of the box. Thanks for catching that! Tested it on a brand new RHEL VM with droid and it worked. |
What problem are you trying to solve?
Factory Droid users cannot install Superpowers through the native plugin system. Droid has a
.factory-plugin/plugin convention (parallel to.claude-plugin/and.cursor-plugin/) and a native skill discovery mechanism, but Superpowers does not ship the required manifests.I use Droid daily and wanted Superpowers without the manual copy-and-symlink workarounds that the existing open PRs propose. Those approaches break on upgrade -- you have to re-copy skills after every
git pull.What does this PR change?
Adds
.factory-plugin/plugin.jsonandmarketplace.jsonmanifests (mirroring the existing.claude-plugin/pattern), adds aDROID_PLUGIN_ROOTenvironment check tohooks/session-startso the hook skips context injection on Droid (which has native skill discovery and shows hook stdout in the UI), registers the new manifests in.version-bump.json, and adds a Factory Droid section toREADME.md.Is this change appropriate for the core library?
Yes. This is a new harness, same as the Cursor support added in #467 and the Copilot CLI support. Factory Droid's plugin system is explicitly compatible with Claude Code plugins (per Factory docs). The change follows the exact same pattern as
.cursor-plugin/-- manifest files plus a platform detection guard in the hook.No skills are copied, duplicated, or modified. The plugin system discovers skills directly from the repo's
skills/directory.What alternatives did you consider?
Copy skills to
~/.factory/skills/(PR feat: Add Factory Droid CLI support #139 approach) -- Rejected because upgrades break. @obra raised this exact concern: "upgrades are going to be nearly impossible." Users would need to re-copy after everygit pull.Symlink skills (also PR feat: Add Factory Droid CLI support #139) -- Droid does not require symlinks when using the plugin system. The plugin system reads skills from the plugin's own directory, so symlinks are unnecessary.
Add custom
skills/superpowers/SKILL.md(PR Add .factory directory with installation docs and scripts #519 approach) -- Rejected because @obra flagged this as "duplicative of standard content, and maintenance is going to be a nightmare."Do nothing and rely on
.claude-plugin/compatibility -- Droid's docs say Claude Code plugins are interoperable, so this might already work. But adding.factory-plugin/gives first-class support and is consistent with how.cursor-plugin/exists alongside.claude-plugin/.The approach I took mirrors #467 (Cursor support) exactly: add the platform's plugin manifest and a hook detection guard. Minimal diff, no duplication, upgrades work via
droid plugin update.Does this PR contain multiple unrelated changes?
No. All changes serve a single purpose: enabling Factory Droid plugin support.
Existing PRs
Why a new PR instead of building on existing ones:
All three open PRs take fundamentally different approaches that the maintainer has already raised concerns about:
~/.factory/skills/and requires manual re-copy on update. @obra commented: "my biggest worry about this is upgrades. Because we're copying files rather than linking them... it feels like upgrades are going to be nearly impossible.".factory/instead of.factory-plugin/for its manifests..factory/. @obra commented on Add Factory's Droid CLI support #130: "this looks autogenerated and not human reviewed... not if it means full copies of all the skills."This PR takes the approach @obra has already accepted for other platforms: the
.cursor-plugin/pattern from #467. Two manifest files, a hook guard, version tracking, and a README section. No skill duplication, no copy scripts, no maintenance burden.Environment tested
Evaluation
Tested on a Linux server with Droid 0.84.0 installed:
droid plugin marketplace add https://github.com/Skyline-9/superpowers-- succeededdroid plugin install superpowers@superpowers-- succeeded, installed at commit 917e5f5droid plugin list-- showssuperpowers@superpowers [user]~/.factory/plugins/marketplaces/superpowers/skills/(brainstorming, test-driven-development, systematic-debugging, etc.)hooks/session-startproduces empty output with exit code 0 whenDROID_PLUGIN_ROOTis sethooks/session-startstill produces full JSON context (5903 bytes) whenDROID_PLUGIN_ROOTis not set (Claude Code/Cursor/Copilot behavior unchanged)droid plugin uninstallanddroid plugin marketplace removeboth clean up correctlyRigor
superpowers:writing-skillsand completed adversarial pressure testingNo skill content was modified. The only behavioral change is the 4-line guard in
hooks/session-startthat exits early whenDROID_PLUGIN_ROOTis set. This variable is only set by Factory Droid when running plugin hooks -- Claude Code, Cursor, and Copilot CLI are unaffected.Human review