Skip to content

feat: add first-class Factory Droids support#329

Open
lukeaus wants to merge 4 commits into
rohitg00:mainfrom
lukeaus:feat/factory-droids-support
Open

feat: add first-class Factory Droids support#329
lukeaus wants to merge 4 commits into
rohitg00:mainfrom
lukeaus:feat/factory-droids-support

Conversation

@lukeaus
Copy link
Copy Markdown

@lukeaus lukeaus commented May 13, 2026

Summary

Adds first-class Factory Droids support to agentmemory, matching the existing Claude Code and Codex CLI plugin patterns.

Closes #331.

What's included

Plugin files

  • .factory-plugin/marketplace.json — Factory marketplace discovery manifest
  • plugin/.factory-plugin/plugin.json — Factory plugin manifest wiring hooks, skills, and MCP
  • plugin/hooks/hooks.factory.json — 12 lifecycle hooks in Factory's format using quoted FACTORY_PLUGIN_ROOT script paths
  • test/factory-plugin.test.ts — Coverage for manifest path resolution, hook scripts, event parity, and marketplace manifest shape

Hook event parity with Claude Code

Hook Claude Code Factory Droids
SessionStart
UserPromptSubmit
PreToolUse ✅ (expanded tool matcher for Droids: bash, run_command, edit_file, write_file)
PostToolUse
PostToolUseFailure
PreCompact
SubagentStart
SubagentStop
Notification
TaskCompleted
Stop
SessionEnd

All 12 hooks match Claude Code's full set. Codex CLI only ships 6 because Codex's hook engine does not support the omitted events.

Documentation

  • README.md — Added Factory Droids to subtitle, agents table, quick-start section, and per-host config table
  • CONTRIBUTING.md — Updated plugins table to list all three platforms
  • SECURITY.md — Updated in-scope description to cover all plugin platforms

Testing

  • npx vitest run test/factory-plugin.test.ts — 6 passed
  • npm run build && npm test — 82 files passed, 883 tests passed

Checklist

  • All hooks shared via plugin/scripts/ — no new script files needed
  • MCP server auto-wired via plugin/.mcp.json
  • Skills auto-wired via plugin/skills/
  • Factory plugin manifest and marketplace covered by tests
  • Hook command script references covered by tests
  • No version bump needed (no package version change)
  • CONTRIBUTING.md requirements followed for the follow-up commit (signed off)
  • AGENTS.md consistency rules not triggered (no MCP tools/endpoints/versions changed)

Summary by CodeRabbit

  • New Features

    • Added Factory Droids as a first-class supported agent with installation instructions.
    • Published a plugin to the marketplace and added manifest + lifecycle hook support.
  • Documentation

    • README updated for Factory Droids and REST-only agents.
    • CONTRIBUTING and SECURITY broadened to reflect expanded plugin support.
  • Tests

    • Added tests validating the plugin marketplace entry, manifest, hooks, and related scripts.

Review Change Stack

lukeaus and others added 2 commits May 13, 2026 21:20
Updates documentation across three files to mention Factory Droids
alongside existing Claude Code and Codex CLI references.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 13, 2026 12:14
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

@lukeaus is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 201ac52d-309f-4670-ad60-c882ccf1e246

📥 Commits

Reviewing files that changed from the base of the PR and between e032ad8 and 5f65977.

📒 Files selected for processing (1)
  • test/factory-plugin.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/factory-plugin.test.ts

📝 Walkthrough

Walkthrough

Adds Factory Droids support by registering the agentmemory plugin in the Factory marketplace, adding a plugin manifest and lifecycle hooks, updating README/CONTRIBUTING/SECURITY, and adding tests that validate manifests, hooks, and marketplace registration.

Changes

Factory Droids Plugin and Documentation Integration

Layer / File(s) Summary
Plugin Marketplace and Manifest Registration
.factory-plugin/marketplace.json, plugin/.factory-plugin/plugin.json
Registers agentmemory in the Factory marketplace and adds a plugin manifest (version: 0.9.11, metadata, factoryVersion constraint, and relative skills, mcpServers, hooks paths).
Plugin Hook Lifecycle Configuration
plugin/hooks/hooks.factory.json
Declares lifecycle hooks for events including SessionStart, UserPromptSubmit, PreToolUse (with toolNames filter), PostToolUse, PostToolUseFailure, PreCompact, SubagentStart, SubagentStop, Notification, TaskCompleted, Stop, and SessionEnd, each invoking command scripts.
Factory Droids Agent Support Documentation
README.md
Adds Factory Droids to the "Works with every agent" table, provides Factory plugin marketplace install instructions and integration subsection, updates agent guidance, and normalizes a banner line.
Supporting Documentation Updates
CONTRIBUTING.md, SECURITY.md
Expands the subsystems table to list plugin platforms as "Claude Code / Codex CLI / Factory Droids" and broadens SECURITY.md scope to include plugins under plugin/ (Claude Code, Codex CLI, Factory Droids).
Manifest and Marketplace Tests
test/factory-plugin.test.ts
Adds Vitest tests that assert plugin manifest required fields, version formatting and parity with root package.json, existence of referenced skills/mcpServers/hooks paths and scripts, hook event coverage, and a single marketplace entry pointing to ./plugin.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I hopped a patch, a plugin bright,

marketplace entry set just right,
hooks that listen, tests that run,
Factory Droids now join the fun,
docs aligned — a ribbon tied with light.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Factory Droids as a first-class supported platform, which is the central focus of all changeset modifications.
Linked Issues check ✅ Passed All requirements from issue #331 are met: Factory plugin manifest created, hooks configuration with 12 lifecycle events added, marketplace manifest for plugin discovery, documentation updated, and existing scripts reused with environment variables.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #331 objectives: plugin manifests, hooks configuration, marketplace registration, documentation updates, and comprehensive test coverage for Factory Droids support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugin/hooks/hooks.factory.json`:
- Line 10: The hook command strings use unquoted ${FACTORY_PLUGIN_ROOT} which
can break on paths with spaces; update each "command" value (e.g., the entry
currently "command": "node ${FACTORY_PLUGIN_ROOT}/scripts/session-start.mjs") to
wrap the variable in quotes so the shell treats the whole path as one argument
(apply the same quoted-${FACTORY_PLUGIN_ROOT} pattern to all other hook commands
referenced in the review). Ensure you only change the command string quoting and
keep the rest of the command intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9f64929-4db4-415e-bb88-92a91016074e

📥 Commits

Reviewing files that changed from the base of the PR and between cba234d and 1295bd6.

📒 Files selected for processing (6)
  • .factory-plugin/marketplace.json
  • CONTRIBUTING.md
  • README.md
  • SECURITY.md
  • plugin/.factory-plugin/plugin.json
  • plugin/hooks/hooks.factory.json

Comment thread plugin/hooks/hooks.factory.json Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class Factory Droids plugin support to agentmemory, aligning Factory’s lifecycle hook + MCP + skills wiring with the existing Claude Code and Codex CLI plugin patterns, and updates documentation/security scope accordingly.

Changes:

  • Added Factory marketplace + plugin manifests and a 12-hook Factory hook registry that reuses existing plugin/scripts/*.mjs.
  • Updated README install docs and per-host configuration table to include Factory Droids.
  • Expanded SECURITY/CONTRIBUTING scope text to cover all plugin platforms under plugin/.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
SECURITY.md Expands “in scope” language to include all plugin platforms under plugin/.
README.md Documents Factory Droids installation + capability matrix entry.
plugin/hooks/hooks.factory.json Registers the 12 Factory lifecycle hooks pointing at existing shared scripts via FACTORY_PLUGIN_ROOT.
plugin/.factory-plugin/plugin.json Adds Factory plugin manifest wiring hooks, skills, and MCP server config.
CONTRIBUTING.md Updates repository layout docs to include all plugin platforms.
.factory-plugin/marketplace.json Adds Factory marketplace discovery manifest pointing at the plugin/ subdir.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +5
{
"name": "agentmemory",
"version": "0.9.11",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 51 MCP tools, 4 skills, real-time viewer.",
"author": {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in e032ad8: added test/factory-plugin.test.ts to verify plugin/.factory-plugin/plugin.json exists, matches the root package.json version, and resolves its skills, mcpServers, and hooks paths.

Comment on lines +8 to +14
"action": {
"type": "command",
"command": "node ${FACTORY_PLUGIN_ROOT}/scripts/session-start.mjs"
}
},
{
"name": "user-prompt-submit",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in e032ad8: the Factory plugin tests now validate every hooks.factory.json command uses the expected ${FACTORY_PLUGIN_ROOT}/scripts/*.mjs pattern and that each referenced script exists on disk.

Comment on lines +1 to +12
{
"name": "agentmemory",
"owner": {
"name": "Rohit Ghumare",
"github": "rohitg00"
},
"plugins": [
{
"name": "agentmemory",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. Factory Droids integration.",
"source": "./plugin"
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in e032ad8: added marketplace coverage for .factory-plugin/marketplace.json, including presence, plugin name, and source path ./plugin.

Add Factory Droids plugin manifest, hook command, and marketplace checks while quoting hook script paths for install directories with spaces.

Signed-off-by: Luke Aust <5635204+lukeaus@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/factory-plugin.test.ts`:
- Around line 14-28: The version regex in the test "ships
.factory-plugin/plugin.json with name + version + references" is too loose
(currently allows trailing characters); update the assertion on manifest.version
to use an anchored semver pattern that requires numeric major.minor.patch and
optionally allows valid pre-release (prefixed with '-') and build metadata
(prefixed with '+') so it rejects strings like "1.2.3abc" or "1.2.3.4". Locate
the manifest.version assertion in the test (the expect checking
manifest.version) and replace the existing unanchored regex with a start-to-end
semver regex that enforces the described rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2586053f-29d9-493f-96ec-5084da038ceb

📥 Commits

Reviewing files that changed from the base of the PR and between 1295bd6 and e032ad8.

📒 Files selected for processing (2)
  • plugin/hooks/hooks.factory.json
  • test/factory-plugin.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugin/hooks/hooks.factory.json

Comment thread test/factory-plugin.test.ts Outdated
Use an anchored semver pattern for the Factory plugin manifest version test.

Signed-off-by: Luke Aust <5635204+lukeaus@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.

Feature Request: Add Factory Droids support

2 participants