feat: add Factory Droid CLI integration (#822)#3587
Open
NurfitraPujo wants to merge 1 commit into
Open
Conversation
Adds a skills-based integration for the Factory Droid CLI alongside the existing Claude/Codex skills agents. The integration scaffolds `.factory/skills/speckit-*` directories, injects canonical `--model`/`--output-format` flags ahead of any operator-supplied extra args, and documents the install step in the devcontainer post-create script (mirroring the Kiro install layout, with a chained EXIT trap so both installer tmpfiles are released on script exit). Includes: - `src/specify_cli/integrations/droid/__init__.py` (subpackage) - `tests/integrations/test_integration_droid.py` (46 tests, including regression coverage for the no-trailing-newline frontmatter fusion bug, idempotent skill injection, and env-var path resolution) - `integrations/catalog.json` entry + `updated_at` bump - Alphabetical registration in `src/specify_cli/integrations/__init__.py` and `tests/integrations/test_registry.py` - Devcontainer Droid install block with EXIT trap that re-invokes the Kiro cleanup handler Closes github#822 Assisted-by: Droid (oracle-reviewer) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Factory Droid CLI as a skills-based integration with workflow execution support.
Changes:
- Registers Droid and scaffolds
.factory/skills/. - Adds execution/frontmatter tests and catalog metadata.
- Adds Droid installation to the devcontainer.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/droid/__init__.py |
Implements Droid integration. |
src/specify_cli/integrations/__init__.py |
Registers Droid. |
tests/integrations/test_integration_droid.py |
Tests Droid behavior. |
tests/integrations/test_registry.py |
Adds Droid to registry expectations. |
integrations/catalog.json |
Adds Droid catalog metadata. |
.devcontainer/post-create.sh |
Installs Droid CLI. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 4
- Review effort level: Medium
Comment on lines
+102
to
+120
| # The upstream installer (https://app.factory.ai/cli) does not publish a | ||
| # pinned SHA-256, so we download it first and execute the captured script | ||
| # (mirroring the Kiro install layout) instead of piping curl into sh | ||
| # directly. After install, ``droid --version`` confirms the binary is on | ||
| # PATH so subsequent ``specify init --integration droid`` runs succeed. | ||
| DROID_INSTALLER_URL="https://app.factory.ai/cli" | ||
| DROID_INSTALLER_PATH="$(mktemp)" | ||
|
|
||
| cleanup_droid_installer() { | ||
| rm -f "$DROID_INSTALLER_PATH" | ||
| # Earlier ``trap`` handlers were overwritten when this block registered | ||
| # its own EXIT handler, so re-run any previously-registered installer | ||
| # cleanups to keep their tmpfiles out of /tmp. | ||
| command -v cleanup_kiro_installer >/dev/null 2>&1 && cleanup_kiro_installer | ||
| } | ||
| trap cleanup_droid_installer EXIT | ||
|
|
||
| run_command "curl -fsSL \"$DROID_INSTALLER_URL\" -o \"$DROID_INSTALLER_PATH\"" | ||
| run_command "sh \"$DROID_INSTALLER_PATH\"" |
| from .copilot import CopilotIntegration | ||
| from .cursor_agent import CursorAgentIntegration | ||
| from .devin import DevinIntegration | ||
| from .droid import DroidIntegration |
Comment on lines
+105
to
+106
| ``SPECKIT_INTEGRATION_DROID_EXTRA_ARGS`` are inserted before the | ||
| canonical Spec Kit flags so they cannot clobber or reorder them. |
Comment on lines
+120
to
+122
| # Note: with duplicate-flag CLI parsing, the operator's value may | ||
| # override the canonical one (parser-dependent); this ordering | ||
| # matches the cursor-agent / opencode / codex convention. |
mnriem
requested changes
Jul 17, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why. And fix test & lint errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a skills-based integration for the Factory Droid CLI alongside the existing Claude/Codex skills agents. The integration scaffolds
.factory/skills/speckit-*directories, injects canonical--model/--output-formatflags ahead of any operator-supplied extra args, and documents the install step in the devcontainer post-create script (mirroring the Kiro install layout, with a chained EXIT trap so both installer tmpfiles are released on script exit).Includes:
src/specify_cli/integrations/droid/__init__.py(subpackage)tests/integrations/test_integration_droid.py(46 tests, including regression coverage for the no-trailing-newline frontmatter fusion bug, idempotent skill injection, and env-var path resolution)integrations/catalog.jsonentry +updated_atbumpsrc/specify_cli/integrations/__init__.pyandtests/integrations/test_registry.pyCloses #822
Assisted-by: Droid (oracle-reviewer)
Description
This PR add support for factory droid cli integration (https://factory.ai/product/cli)
Testing
since this is a new isolated module for adding new integration, I already added new tests cases to make sure the integration running correctly.
uv run specify --helpuv sync && uv run pytestAI Disclosure
I use AI for research, planning, implementing, testing and reviewing the changes. I did review the research and plan results, but I don't do much on reviewing the implementation, it's majorly reviewed by AI.