Skip to content

Add support for Junie from JetBrains tool and command generation#853

Open
preigile wants to merge 2 commits intoFission-AI:mainfrom
preigile:support-junie
Open

Add support for Junie from JetBrains tool and command generation#853
preigile wants to merge 2 commits intoFission-AI:mainfrom
preigile:support-junie

Conversation

@preigile
Copy link

@preigile preigile commented Mar 17, 2026

Added support for Junie, an AI agent from JetBrains

Summary by CodeRabbit

  • New Features
    • Junie is now available as a selectable tool during setup and via the --tools option.
  • Documentation
    • Tool directory reference updated to include Junie and its command/skills locations.
  • Tests
    • Registry tests updated to include and verify the Junie adapter is registered and discoverable.

@preigile preigile requested a review from TabishB as a code owner March 17, 2026 17:08
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc404ecb-2c27-49d8-b3a2-e1a97977874b

📥 Commits

Reviewing files that changed from the base of the PR and between b9aa00c and 448ddf4.

📒 Files selected for processing (2)
  • docs/supported-tools.md
  • src/core/legacy-cleanup.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/core/legacy-cleanup.ts
  • docs/supported-tools.md

📝 Walkthrough

Walkthrough

Adds the Junie tool: new command adapter implementation, export and registry registration, AI_TOOLS configuration entry, legacy command path patterns, docs update, and tests verifying registration.

Changes

Cohort / File(s) Summary
Junie Adapter Implementation
src/core/command-generation/adapters/junie.ts
New junieAdapter implementing ToolCommandAdapter with getFilePath(commandId) returning .junie/commands/opsx-<id>.md and formatFile(content) producing Markdown with YAML frontmatter (description) and body.
Adapter Export & Registry
src/core/command-generation/adapters/index.ts, src/core/command-generation/registry.ts
Exported junieAdapter and added it to CommandAdapterRegistry initialization so it's discoverable by key junie.
Configuration & Legacy Paths
src/core/config.ts, src/core/legacy-cleanup.ts
Added Junie to AI_TOOLS (value: 'junie', skillsDir: '.junie') and added legacy file patterns for Junie commands in LEGACY_SLASH_COMMAND_PATHS.
Docs & Tests
docs/supported-tools.md, test/core/command-generation/registry.test.ts
Docs updated to include Junie in tool IDs and directory references; registry tests extended to assert junie adapter presence and properties.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI/Generator
    participant Registry as CommandAdapterRegistry
    participant Adapter as junieAdapter
    participant FS as FileSystem

    CLI->>Registry: request adapter for "junie"
    Registry-->>CLI: returns junieAdapter
    CLI->>Adapter: build CommandContent + commandId
    Adapter-->>CLI: filePath (".junie/commands/opsx-<id>.md") and formattedContent
    CLI->>FS: write filePath with formattedContent
    FS-->>CLI: write success
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • TabishB

Poem

🐰 I stitched a Junie file so neat,
YAML frontmatter, body complete,
Registry found me with a hop and cheer,
Commands now live in a .junie sphere,
Hooray — new tool, a tidy feat! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 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 support for Junie tool and command generation, which is reflected across all modified files including adapters, configuration, registry, documentation, and tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Copy link
Contributor

@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: 2

🧹 Nitpick comments (1)
test/core/command-generation/registry.test.ts (1)

24-28: Add Junie behavior assertions, not only registry presence.

Lines 24-28 and Line 63 validate registration, but they don’t verify Junie-specific path/format behavior. A broken Junie adapter implementation could still pass these tests.

Suggested test additions
@@
     it('registered adapters should have working getFilePath', () => {
       const claudeAdapter = CommandAdapterRegistry.get('claude');
       const cursorAdapter = CommandAdapterRegistry.get('cursor');
       const windsurfAdapter = CommandAdapterRegistry.get('windsurf');
+      const junieAdapter = CommandAdapterRegistry.get('junie');

       expect(claudeAdapter?.getFilePath('test')).toContain('.claude');
       expect(cursorAdapter?.getFilePath('test')).toContain('.cursor');
       expect(windsurfAdapter?.getFilePath('test')).toContain('.windsurf');
+      expect(junieAdapter?.getFilePath('test')).toContain('.junie');
+      expect(junieAdapter?.getFilePath('test')).toContain('opsx-test.md');
     });
@@
       const adapters = CommandAdapterRegistry.getAll();
       for (const adapter of adapters) {
         const output = adapter.formatFile(content);
@@
       }
+
+      const junieOutput = CommandAdapterRegistry.get('junie')?.formatFile(content) ?? '';
+      expect(junieOutput).toContain('description: Test desc');
+      expect(junieOutput).toContain('Body content');
     });

Also applies to: 63-63

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/core/command-generation/registry.test.ts` around lines 24 - 28, The test
currently only checks registry presence for CommandAdapterRegistry.get('junie');
extend it to exercise Junie-specific behavior by calling the adapter's public
formatting/build method(s) (e.g., adapter.formatCommand(...) or
adapter.buildCommand(...) — whichever the CommandAdapter interface exposes) with
a representative input and assert the returned path/format/command matches Junie
expectations (for example specific path prefix, file extension, or command
structure) in the same test block (and similarly at the other location around
line 63); keep the existing toolId assertion and add one or two focused
assertions that validate Junie-specific output so a broken Junie adapter
implementation will fail the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/supported-tools.md`:
- Line 39: Update the Junie table row to match the rest of the table convention
by adding the tool ID and concrete include/exclude patterns: replace the current
row containing "Junie | `.junie/skills/` | `.junie/commands/`" with a
four-column entry that includes the tool ID (e.g., "junie") and explicit pattern
entries (for example, include pattern like ".junie/**" and specific subfolder
patterns such as ".junie/skills/**" and ".junie/commands/**") so the Junie row
uses the same columns and concrete patterns as other tool rows.

In `@src/core/legacy-cleanup.ts`:
- Line 56: The Junie legacy cleanup entry currently uses the glob pattern
'.junie/commands/openspec-*.md' but Junie generator actually emits files named
'opsx-*.md' (see the 'junie' mapping in legacy-cleanup.ts); update the 'junie'
mapping's pattern to match the generated filenames (e.g., change to
'.junie/commands/opsx-*.md' or include both patterns) so stale Junie command
files are detected and removed by the cleanup flow.

---

Nitpick comments:
In `@test/core/command-generation/registry.test.ts`:
- Around line 24-28: The test currently only checks registry presence for
CommandAdapterRegistry.get('junie'); extend it to exercise Junie-specific
behavior by calling the adapter's public formatting/build method(s) (e.g.,
adapter.formatCommand(...) or adapter.buildCommand(...) — whichever the
CommandAdapter interface exposes) with a representative input and assert the
returned path/format/command matches Junie expectations (for example specific
path prefix, file extension, or command structure) in the same test block (and
similarly at the other location around line 63); keep the existing toolId
assertion and add one or two focused assertions that validate Junie-specific
output so a broken Junie adapter implementation will fail the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 038bb184-1c73-4298-a576-d6b5d537cc94

📥 Commits

Reviewing files that changed from the base of the PR and between afdca0d and b9aa00c.

📒 Files selected for processing (7)
  • docs/supported-tools.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/adapters/junie.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • src/core/legacy-cleanup.ts
  • test/core/command-generation/registry.test.ts

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.

1 participant