Skip to content

Commit f79362a

Browse files
authored
Merge pull request #59 from Kevdome3000/main
Support for Junie Agent from jetbrains
2 parents 7532f13 + 06f9368 commit f79362a

5 files changed

Lines changed: 25 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Rules:
325325
- Keep canonical skill IDs namespaced as `dotnet-*` in the repository, but let the CLI accept short aliases such as `aspire` or `orleans` in commands.
326326
- Treat repo-owned orchestration agents as a parallel catalog layer; do not force the first rollout of agents into the current `dotnet-skills` CLI lifecycle before the repo structure and docs are stable.
327327
- Canonical repo-owned agents live in folder-per-agent layouts with `AGENT.md`; runtime-specific `.agent.md` or native Claude files are adapters, not the source of truth.
328-
- The installer must account for Codex, Claude, Copilot, and Gemini target layouts instead of assuming only one global skills directory.
328+
- The installer must account for Codex, Claude, Copilot, Gemini, and Junie target layouts instead of assuming only one global skills directory.
329329
- The bare `dotnet skills` entrypoint should behave like a polished interactive console application for browsing the catalog, inspecting details, and installing or removing content without remembering subcommands. Explicit command arguments must still bypass the interactive app and execute directly.
330330
- When vendor-specific install behavior diverges, model it with separate per-platform strategy classes instead of growing one shared resolver or installer full of platform switches.
331331
- Do not duplicate home-directory or environment-root resolution helpers across resolvers. Keep shared path-context logic in one place and let per-platform strategies consume it.
@@ -334,9 +334,10 @@ Rules:
334334
- For Claude Code, use the official native paths: project `.claude/skills` and `.claude/agents`, user `~/.claude/skills` and `~/.claude/agents`.
335335
- For Codex, use the native per-platform buckets that `dotnet-skills` manages: project `.codex/skills` and `.codex/agents`, user `$CODEX_HOME/skills` and `$CODEX_HOME/agents` (default `~/.codex/skills` and `~/.codex/agents`). Keep `.agents/skills` only as the default fallback when no native client root exists.
336336
- For Gemini CLI, use the native paths: project `.gemini/skills` and `.gemini/agents`, user `~/.gemini/skills` and `~/.gemini/agents`.
337-
- When `--agent` is omitted for skill installation, detect existing native client roots in this order: `.codex`, `.claude`, `.github`, `.gemini`. Install into every detected native client target. Use `.agents/skills` only when none of those native roots exist yet.
337+
- For Junie, use the native paths: project `.junie/skills` and `.junie/agents`, user `~/.junie/skills` and `~/.junie/agents`.
338+
- When `--agent` is omitted for skill installation, detect existing native client roots in this order: `.codex`, `.claude`, `.github`, `.gemini`, `.junie`. Install into every detected native client target. Use `.agents/skills` only when none of those native roots exist yet.
338339
- Do not add `.agents/skills` alongside native client targets during auto-detect. `.agents/skills` is fallback-only, not an extra fan-out destination when a native CLI root already exists.
339-
- For repo-owned orchestration agents, auto-detect only vendor-native agent locations: `.codex/agents`, `.claude/agents`, `.github/agents`, and `.gemini/agents`.
340+
- For repo-owned orchestration agents, auto-detect only vendor-native agent locations: `.codex/agents`, `.claude/agents`, `.github/agents`, `.gemini/agents`, and `.junie/agents`.
340341
- Do not treat shared `.agents` directories as a portable agent target and do not map `.agents` to Codex.
341342
- If `dotnet skills agent install` runs in auto mode and no native agent directory exists yet, fail with a clear message that asks for an explicit `--agent` or `--target`.
342343
- If `dotnet skills agent ... --target <path>` is used, require an explicit `--agent`. Agent payload formats differ by platform, so auto mode must not guess a file format for a custom target.
@@ -555,7 +556,7 @@ This repository should behave like a maintainable documentation-and-automation s
555556

556557
- Public NuGet distribution and CI-verified installability for the tool instead of contributor-local `--add-source` install loops.
557558
- Canonical `dotnet-*` skill IDs in the repository, with short aliases in CLI commands.
558-
- Agent-aware install flows that understand Codex, Claude, Copilot, and Gemini instead of assuming one shared folder layout.
559+
- Agent-aware install flows that understand Codex, Claude, Copilot, Gemini, and Junie instead of assuming one shared folder layout.
559560
- Official agent standards and native agent layouts instead of repo-local pseudo-standards.
560561
- One obvious upstream watch config surface: a small base file plus optional shard files with the same two obvious lists: `github_releases` and `documentation`.
561562
- Minimal watch entries: `source` plus related skills, with optional overrides only when really needed.

tools/ManagedCode.DotnetSkills/Runtime/AgentInstallTarget.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ internal sealed record AgentInstallLayout(
2323
AgentPlatform.Claude => "Restart Claude Code or run /agents to pick up new agents.",
2424
AgentPlatform.Copilot => "Restart Copilot CLI or your IDE agent session to pick up new agents.",
2525
AgentPlatform.Gemini => "Run /agents reload or restart Gemini CLI to pick up new agents.",
26+
AgentPlatform.Junie => "Restart Junie or reload the project to pick up new agents.",
2627
_ => "Restart your agent session to pick up new agents.",
2728
};
2829

tools/ManagedCode.DotnetSkills/Runtime/Platforms/InstallPlatformRegistry.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ internal static class InstallPlatformRegistry
88
new ClaudeInstallPlatformStrategy(),
99
new CopilotInstallPlatformStrategy(),
1010
new GeminiInstallPlatformStrategy(),
11+
new JunieInstallPlatformStrategy(),
1112
];
1213

1314
public static IReadOnlyList<IInstallPlatformStrategy> StrategiesInDetectionOrder => Strategies;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace ManagedCode.DotnetSkills.Runtime;
2+
3+
internal sealed class JunieInstallPlatformStrategy : InstallPlatformStrategyBase
4+
{
5+
public override AgentPlatform Platform => AgentPlatform.Junie;
6+
7+
protected override DirectoryInfo GetNativeRoot(InstallPathContext context, InstallScope scope)
8+
{
9+
return scope == InstallScope.Project
10+
? new DirectoryInfo(Path.Combine(context.ProjectRoot.FullName, ".junie"))
11+
: new DirectoryInfo(Path.Combine(context.UserHome.FullName, ".junie"));
12+
}
13+
}

tools/ManagedCode.DotnetSkills/Runtime/SkillInstallTarget.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ internal enum AgentPlatform
77
Claude,
88
Copilot,
99
Gemini,
10+
Junie,
1011
}
1112

1213
internal enum InstallScope
@@ -36,6 +37,7 @@ internal sealed record SkillInstallLayout(
3637
AgentPlatform.Claude => "Restart Claude Code or start a new session to pick up new skills.",
3738
AgentPlatform.Copilot => "Restart Copilot CLI or your IDE agent session to pick up new skills.",
3839
AgentPlatform.Gemini => "Run /skills reload or restart Gemini CLI to pick up new skills.",
40+
AgentPlatform.Junie => "Restart Junie or reload the project to pick up new skills.",
3941
_ => "Restart your agent session to pick up new skills.",
4042
};
4143
}
@@ -77,7 +79,9 @@ public static SkillInstallLayout Resolve(
7779
"gemini" => AgentPlatform.Gemini,
7880
"google" => AgentPlatform.Gemini,
7981
"google-gemini" => AgentPlatform.Gemini,
80-
_ => throw new InvalidOperationException("Unsupported agent: " + value + ". Expected auto, codex, openai, claude, anthropic, copilot, github-copilot, gemini, or google-gemini."),
82+
"junie" => AgentPlatform.Junie,
83+
"jetbrains" => AgentPlatform.Junie,
84+
_ => throw new InvalidOperationException("Unsupported agent: " + value + ". Expected auto, codex, openai, claude, anthropic, copilot, github-copilot, gemini, google-gemini, junie, or jetbrains."),
8185
};
8286

8387
public static InstallScope ParseScope(string value) => value.ToLowerInvariant() switch

0 commit comments

Comments
 (0)