Skip to content

Comments

Add Factory Droid as a converter target#174

Merged
kieranklaassen merged 1 commit intoEveryInc:mainfrom
adamprime:add-factory-droid-target
Feb 11, 2026
Merged

Add Factory Droid as a converter target#174
kieranklaassen merged 1 commit intoEveryInc:mainfrom
adamprime:add-factory-droid-target

Conversation

@adamprime
Copy link
Contributor

Summary

Adds Factory Droid (docs.factory.ai) as a new converter target, alongside the existing OpenCode and Codex targets. This automates the manual workaround described in #31.

What it does

# Convert a Claude Code plugin to Factory Droid format
bun run convert ./plugins/compound-engineering --to droid

# Or install directly
bun run cli:install compound-engineering --to droid

The converter outputs to ~/.factory/ with the following structure:

  • Commands~/.factory/commands/ (flattened, top-level .md files — strips namespace prefixes like workflows:)
  • Agents~/.factory/droids/ (converted to Droid frontmatter format with name, description, model, tools)
  • Skills~/.factory/skills/ (copied as-is, directory-per-skill)

Content transformations

  • Task agent-name(args)Task agent-name: args (Droid's Task tool syntax)
  • /workflows:plan/plan (namespace prefix stripped for top-level registration)
  • @agent-security-sentinelthe security-sentinel droid (Droid terminology)
  • Claude tool names mapped to Factory tool names (BashExecute, WriteCreate, etc.)

Files added/modified

  • src/types/droid.ts — Bundle type definitions
  • src/converters/claude-to-droid.ts — Converter logic
  • src/targets/droid.ts — File writer
  • src/targets/index.ts — Target registration
  • src/commands/convert.ts / install.ts — Updated to accept --to droid and route output to ~/.factory
  • tests/droid-converter.test.ts — 9 converter tests
  • tests/droid-writer.test.ts — 4 writer tests

All 53 tests pass (40 existing + 13 new).

Context

This was suggested by @kieranklaassen in #31 (comment). I wrote about the manual setup process and the workaround here — this PR replaces that manual process with a proper converter.

Adds a new 'droid' target to the converter that outputs Claude Code plugins
in Factory Droid's format:

- Commands flattened to ~/.factory/commands/ (strips namespace prefixes)
- Agents converted to droids in ~/.factory/droids/ with proper frontmatter
- Skills copied to ~/.factory/skills/
- Content transforms: Task calls, slash commands, and @agent references
  adapted to Droid conventions

This resolves the manual workaround described in issue EveryInc#31 by automating
the conversion from Claude Code plugin format to Factory Droid's expected
directory structure.

Includes 13 tests covering converter logic and file writer behavior.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@kieranklaassen
Copy link
Collaborator

Thank you!! This is great

@kieranklaassen kieranklaassen merged commit 4ab08dc into EveryInc:main Feb 11, 2026
1 check passed
@adamprime adamprime deleted the add-factory-droid-target branch February 11, 2026 17:50
@adamprime
Copy link
Contributor Author

cheers!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants