-
Notifications
You must be signed in to change notification settings - Fork 10.2k
feat: add Firebender integration (Android Studio / IntelliJ) #3077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mnriem
merged 2 commits into
github:main
from
jawwad-ali:feat/1548-firebender-integration
Jun 23, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| """Firebender IDE integration. | ||
| Firebender (https://firebender.com/) is an AI coding agent for Android Studio | ||
| and IntelliJ. It reads project-local custom slash commands from | ||
| ``.firebender/commands/*.mdc`` and project rules from ``.firebender/rules/*.mdc``, | ||
| so Spec Kit installs its command templates as ``.mdc`` command files and writes | ||
| the managed context section into a ``.firebender/rules/`` rule file. | ||
| """ | ||
|
|
||
| from ..base import MarkdownIntegration | ||
|
|
||
|
|
||
| class FirebenderIntegration(MarkdownIntegration): | ||
| key = "firebender" | ||
| config = { | ||
| "name": "Firebender", | ||
| "folder": ".firebender/", | ||
| "commands_subdir": "commands", | ||
| "install_url": "https://firebender.com/", | ||
| "requires_cli": False, | ||
| } | ||
| registrar_config = { | ||
| "dir": ".firebender/commands", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".mdc", | ||
| } | ||
| context_file = ".firebender/rules/specify-rules.mdc" | ||
| multi_install_safe = True | ||
|
|
||
| def command_filename(self, template_name: str) -> str: | ||
| """Firebender reads custom slash commands from ``.firebender/commands/*.mdc``.""" | ||
| return f"speckit.{template_name}.mdc" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| """Tests for FirebenderIntegration.""" | ||
|
|
||
| from specify_cli.integrations import get_integration | ||
| from specify_cli.integrations.manifest import IntegrationManifest | ||
|
|
||
| from .test_integration_base_markdown import MarkdownIntegrationTests | ||
|
|
||
|
|
||
| class TestFirebenderIntegration(MarkdownIntegrationTests): | ||
| KEY = "firebender" | ||
| FOLDER = ".firebender/" | ||
| COMMANDS_SUBDIR = "commands" | ||
| REGISTRAR_DIR = ".firebender/commands" | ||
| CONTEXT_FILE = ".firebender/rules/specify-rules.mdc" | ||
|
|
||
| # Firebender reads custom slash commands from ``.firebender/commands/*.mdc``, | ||
| # so this integration uses the ``.mdc`` extension instead of the ``.md`` | ||
| # default the base mixin assumes. Override the two extension-specific tests. | ||
| def test_registrar_config(self): | ||
| i = get_integration(self.KEY) | ||
| assert i.registrar_config["dir"] == self.REGISTRAR_DIR | ||
| assert i.registrar_config["format"] == "markdown" | ||
| assert i.registrar_config["args"] == "$ARGUMENTS" | ||
| assert i.registrar_config["extension"] == ".mdc" | ||
|
|
||
| def test_setup_creates_files(self, tmp_path): | ||
| i = get_integration(self.KEY) | ||
| m = IntegrationManifest(self.KEY, tmp_path) | ||
| created = i.setup(tmp_path, m) | ||
| assert len(created) > 0 | ||
| cmd_files = [f for f in created if "scripts" not in f.parts] | ||
| for f in cmd_files: | ||
| assert f.exists() | ||
| assert f.name.startswith("speckit.") | ||
| assert f.name.endswith(".mdc") | ||
|
|
||
| def _expected_files(self, script_variant: str) -> list[str]: | ||
| # Firebender emits ``.mdc`` command files, so remap the base mixin's | ||
| # ``.md`` expectations for files under this integration's command dir. | ||
| cmd_dir = get_integration(self.KEY).registrar_config["dir"] | ||
| prefix = cmd_dir + "/" | ||
| return sorted( | ||
| f[:-3] + ".mdc" if f.startswith(prefix) and f.endswith(".md") else f | ||
| for f in super()._expected_files(script_variant) | ||
| ) |
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
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.
Uh oh!
There was an error while loading. Please reload this page.