Conversation
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.
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.
This comment has been minimized.
This comment has been minimized.
PR #1260 Review CompleteOverall Verdict: ✅ MERGEABLE Both code quality and security reviews found only low-severity or informational issues - no blockers for merging. Code Review Findings
Security Review Findings
Summary
The PR is well-implemented, follows established patterns, has comprehensive test coverage, and introduces no security vulnerabilities. |
dyoshikawa
left a comment
There was a problem hiding this comment.
Code Review
🔴 High: JunieSubagentFrontmatterSchema — name/description required/optional appears inverted from official docs
File: src/features/subagents/junie-subagent.ts
The current schema defines name as required and description as optional:
export const JunieSubagentFrontmatterSchema = z.looseObject({
name: z.string(),
description: z.optional(z.string()),
});However, according to the Junie CLI subagents documentation:
name: Not required (defaults to the filename when omitted)description: Required (used by the main agent to decide task delegation)
The test cases in junie-subagent.test.ts follow this inverted logic as well ("should accept valid frontmatter without description", "should reject frontmatter missing name").
How to fix:
Update the schema to match the official spec:
export const JunieSubagentFrontmatterSchema = z.looseObject({
name: z.optional(z.string()),
description: z.string(),
});And update the corresponding test cases accordingly. If the current behavior is intentional (e.g., Rulesync requires name for its own internal processing), please add a comment explaining why it diverges from the official spec.
🟡 Medium: fromRulesyncSubagent should use filterToolSpecificSection to prevent field overwriting
File: src/features/subagents/junie-subagent.ts — fromRulesyncSubagent()
The current implementation spreads junieSection directly into rawJunieFrontmatter:
const junieSection = rulesyncFrontmatter.junie ?? {};
const rawJunieFrontmatter = {
name: rulesyncFrontmatter.name,
description: rulesyncFrontmatter.description,
...junieSection, // If junieSection contains "name" or "description", they silently overwrite the above
};If a user places name or description inside the junie: section of a rulesync file, those values will silently overwrite the top-level rulesync values. The existing KiroSubagent implementation avoids this by using filterToolSpecificSection:
// kiro-subagent.ts
const kiroSection = this.filterToolSpecificSection(rawSection, [
"name",
"description",
"prompt",
]);How to fix:
Use filterToolSpecificSection to strip common fields from junieSection before spreading:
const junieSection = this.filterToolSpecificSection(
rulesyncFrontmatter.junie ?? {},
["name", "description"],
);
const rawJunieFrontmatter = {
name: rulesyncFrontmatter.name,
description: rulesyncFrontmatter.description,
...junieSection,
};🟡 Medium: Missing .junie/skills/ and .junie/agents/ entries in gitignore.ts
File: src/cli/commands/gitignore.ts
Per feature-change-guidelines.md: "Evaluate whether gitignore.ts needs additions or changes in its generated output."
This PR adds Junie skills (.junie/skills/) and subagents (.junie/agents/) as generated output directories, but the gitignore entries were not updated. Currently only the following Junie entries exist:
// Junie
"**/.junie/guidelines.md",
"**/.junie/mcp.json",Other tools (e.g., Kiro, Copilot) include their corresponding directories:
// Kiro
"**/.kiro/skills/",
"**/.kiro/agents/",How to fix:
Add the new entries to gitignore.ts:
// Junie
"**/.junie/guidelines.md",
"**/.junie/mcp.json",
"**/.junie/skills/",
"**/.junie/agents/",Then run pnpm dev gitignore to regenerate .gitignore, and update gitignore.test.ts accordingly.
Makes the description field mandatory and the name field optional for Junie subagents. If a name is not provided, it now defaults to the filename without the extension. Tests have been updated to reflect these validation changes.
Filters out the name and description fields from tool-specific configuration sections like claudecode and junie during subagent conversion. This ensures that top-level metadata takes precedence and is not accidentally overwritten by tool-specific blocks.
|
Thank you for your contribution! Unfortunately, this PR has 1073 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. |
|
@dyoshikawa requested changes implemented - but pushed the PR above the 1000 line threshold. Do you really need this split into 2 prs? |
|
@dacgray sorry, I'll review it later. up to 1000 is too strict, isn't it 🤔 |
|
Thank you for your contribution! Unfortunately, this PR has 1073 added lines, which exceeds the limit of 1000 lines for external contributors. Please split your changes into smaller PRs. See CONTRIBUTING.md for details. |
Now supported:
https://junie.jetbrains.com/docs/agent-skills.html
https://junie.jetbrains.com/docs/junie-cli-subagents.html