Skip to content

Add skills and subagents for junie#1255

Closed
dacgray wants to merge 4 commits intodyoshikawa:mainfrom
dacgray:add-skills-for-junie
Closed

Add skills and subagents for junie#1255
dacgray wants to merge 4 commits intodyoshikawa:mainfrom
dacgray:add-skills-for-junie

Conversation

@dacgray
Copy link
Contributor

@dacgray dacgray commented Mar 3, 2026

Junie now supports skills and subagents: https://junie.jetbrains.com/docs/agent-skills.html

dacgray added 3 commits March 3, 2026 22:36
Introduces the `JunieSkill` class and integrates it into the skill processing framework.

This enables the system to:
- Manage and validate skills located in `.junie/skills` directories.
- Convert between generic `RulesyncSkill` and `JunieSkill` formats.
- Support both project-level and global Junie skills.

Updates the README to reflect the added support and global capability for Junie.
Implements the `JunieSubagent` class to represent and manage Junie-specific agents.

Enables bi-directional conversion between `JunieSubagent` and `RulesyncSubagent` formats, facilitating interoperability and preserving Junie-specific frontmatter.

Integrates Junie into the subagent processing system, allowing Rulesync subagents to target Junie for operations.

Adds frontmatter validation, file loading, and path resolution capabilities for Junie subagents.

Updates the `README.md` to reflect Junie's support for conversion from Rulesync.
Adds Junie to the lists of recognized subagents within skill and subagent processing tests.
Includes the necessary `relativeDirPath` configuration when initializing Junie subagents from Rulesync, ensuring proper setup.
@dyoshikawa-claw

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

PR #1255 Review - Add Skills and Subagents for Junie

Overall Mergeability Verdict: NOT MERGEABLE

The PR has high-severity code quality issues that should be addressed before merging. However, there are no security vulnerabilities and the implementation is secure.


Code Review Findings

High Severity Issues:

  1. JunieSkill.getSettablePaths() missing global mode error handling (High)

    • Location: src/features/skills/junie-skill.ts:72-76
    • Unlike other skill implementations (KiroSkill, CopilotSkill, ReplitSkill), this doesn't throw an error when global: true is passed
    • Should follow the pattern:
      if (options?.global) {
        throw new Error("JunieSkill does not support global mode.");
      }
  2. Documentation not synchronized with implementation (High)

    • Location: docs/reference/supported-tools.md:23
    • The skills and subagents columns for JetBrains Junie should show to reflect the new functionality

Medium Severity Issues:

  1. Test doesn't verify global mode error handling (Medium)

    • Location: src/features/skills/junie-skill.test.ts:34-37
    • Test expects success when global: true is passed, but processor metadata shows supportsGlobal: false
  2. Missing test coverage for global mode error (Medium)

    • Should have a test verifying error is thrown when global mode is requested, like other skill implementations

Positive Observations:

  1. ✅ Good adherence to coding guidelines (uses zod/mini, formatError(), join() from node:path)
  2. ✅ Test coverage is comprehensive (243 lines of tests for junie-skill, 323 for junie-subagent)
  3. ✅ Follows existing patterns and conventions
  4. ✅ All CI checks pass (4180 tests passed)

Security Review Findings

Overall Security Assessment: LOW RISK

  1. Path Traversal Protection - SECURE ✅

    • Properly inherits protections from base classes (AiDir and AiFile)
    • Built-in validation in getDirPath() and getFilePath() methods
  2. Input Validation - COMPLIANT ✅

    • Uses zod/mini with z.looseObject() per project guidelines
    • Frontmatter schemas validate required fields properly
  3. Injection Vulnerabilities - NONE FOUND ✅

    • No use of exec, spawn, eval, or dangerous functions
    • No shell command interpolation
  4. Secret/Credential Exposure - NONE FOUND ✅

    • No hardcoded secrets or credentials
    • No authentication handling
  5. File Operations - SECURE ✅

    • Uses safe file utilities (writeFileContent, readFileContent, ensureDir)
    • Path construction uses node:path.join()
  6. YAML Parsing - SECURE ✅

    • Uses gray-matter with prototype pollution protection
    • isPlainObject check prevents prototype pollution attacks

Low Severity/Informational:

  1. Extra Fields Handling (LOW)
    • Extra fields from frontmatter are preserved in output
    • This is intentional for forward compatibility with evolving AI tool specs

Required Actions Before Merge

  1. Add global mode error handling in JunieSkill.getSettablePaths() to match other skill implementations
  2. Update docs/reference/supported-tools.md to show Junie skills and subagents support
  3. Add test for global mode error handling
  4. Fix existing global mode test to expect an error

Security Approval

Approved from a security perspective - No vulnerabilities identified, all security best practices followed.

github run

Updates documentation to reflect Junie's capabilities for Retrieval Augmented Generation and conversational interactions.

Enforces local-only configuration for Junie skills and subagents by throwing an error when global mode is requested for settable paths. This clarifies that Junie does not support global path configurations, ensuring correct usage.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Thank you for your contribution! Unfortunately, this PR has 1002 added lines, which exceeds the limit of 1000 lines for external contributors.

Please split your changes into smaller PRs. See CONTRIBUTING.md for details.

This PR has been automatically closed.

@github-actions github-actions bot closed this Mar 4, 2026
@dacgray
Copy link
Contributor Author

dacgray commented Mar 4, 2026

@dyoshikawa Bro - please take a look a this PR. The 1000 line limit is very restrictive. I'm just trying to help.

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