diff --git a/AGENTS.md b/AGENTS.md index c4519c4..bef0483 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -325,7 +325,7 @@ Rules: - Keep canonical skill IDs namespaced as `dotnet-*` in the repository, but let the CLI accept short aliases such as `aspire` or `orleans` in commands. - 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. - 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. -- The installer must account for Codex, Claude, Copilot, and Gemini target layouts instead of assuming only one global skills directory. +- The installer must account for Codex, Claude, Copilot, Gemini, and Junie target layouts instead of assuming only one global skills directory. - 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. - 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. - 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: - For Claude Code, use the official native paths: project `.claude/skills` and `.claude/agents`, user `~/.claude/skills` and `~/.claude/agents`. - 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. - For Gemini CLI, use the native paths: project `.gemini/skills` and `.gemini/agents`, user `~/.gemini/skills` and `~/.gemini/agents`. -- 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. +- For Junie, use the native paths: project `.junie/skills` and `.junie/agents`, user `~/.junie/skills` and `~/.junie/agents`. +- 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. - 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. -- For repo-owned orchestration agents, auto-detect only vendor-native agent locations: `.codex/agents`, `.claude/agents`, `.github/agents`, and `.gemini/agents`. +- For repo-owned orchestration agents, auto-detect only vendor-native agent locations: `.codex/agents`, `.claude/agents`, `.github/agents`, `.gemini/agents`, and `.junie/agents`. - Do not treat shared `.agents` directories as a portable agent target and do not map `.agents` to Codex. - 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`. - If `dotnet skills agent ... --target ` 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 - Public NuGet distribution and CI-verified installability for the tool instead of contributor-local `--add-source` install loops. - Canonical `dotnet-*` skill IDs in the repository, with short aliases in CLI commands. -- Agent-aware install flows that understand Codex, Claude, Copilot, and Gemini instead of assuming one shared folder layout. +- Agent-aware install flows that understand Codex, Claude, Copilot, Gemini, and Junie instead of assuming one shared folder layout. - Official agent standards and native agent layouts instead of repo-local pseudo-standards. - One obvious upstream watch config surface: a small base file plus optional shard files with the same two obvious lists: `github_releases` and `documentation`. - Minimal watch entries: `source` plus related skills, with optional overrides only when really needed. diff --git a/tools/ManagedCode.DotnetSkills/Runtime/AgentInstallTarget.cs b/tools/ManagedCode.DotnetSkills/Runtime/AgentInstallTarget.cs index a04280e..2d99348 100644 --- a/tools/ManagedCode.DotnetSkills/Runtime/AgentInstallTarget.cs +++ b/tools/ManagedCode.DotnetSkills/Runtime/AgentInstallTarget.cs @@ -23,6 +23,7 @@ internal sealed record AgentInstallLayout( AgentPlatform.Claude => "Restart Claude Code or run /agents to pick up new agents.", AgentPlatform.Copilot => "Restart Copilot CLI or your IDE agent session to pick up new agents.", AgentPlatform.Gemini => "Run /agents reload or restart Gemini CLI to pick up new agents.", + AgentPlatform.Junie => "Restart Junie or reload the project to pick up new agents.", _ => "Restart your agent session to pick up new agents.", }; diff --git a/tools/ManagedCode.DotnetSkills/Runtime/Platforms/InstallPlatformRegistry.cs b/tools/ManagedCode.DotnetSkills/Runtime/Platforms/InstallPlatformRegistry.cs index 799d98c..7b8cd72 100644 --- a/tools/ManagedCode.DotnetSkills/Runtime/Platforms/InstallPlatformRegistry.cs +++ b/tools/ManagedCode.DotnetSkills/Runtime/Platforms/InstallPlatformRegistry.cs @@ -8,6 +8,7 @@ internal static class InstallPlatformRegistry new ClaudeInstallPlatformStrategy(), new CopilotInstallPlatformStrategy(), new GeminiInstallPlatformStrategy(), + new JunieInstallPlatformStrategy(), ]; public static IReadOnlyList StrategiesInDetectionOrder => Strategies; diff --git a/tools/ManagedCode.DotnetSkills/Runtime/Platforms/JunieInstallPlatformStrategy.cs b/tools/ManagedCode.DotnetSkills/Runtime/Platforms/JunieInstallPlatformStrategy.cs new file mode 100644 index 0000000..7f67f89 --- /dev/null +++ b/tools/ManagedCode.DotnetSkills/Runtime/Platforms/JunieInstallPlatformStrategy.cs @@ -0,0 +1,13 @@ +namespace ManagedCode.DotnetSkills.Runtime; + +internal sealed class JunieInstallPlatformStrategy : InstallPlatformStrategyBase +{ + public override AgentPlatform Platform => AgentPlatform.Junie; + + protected override DirectoryInfo GetNativeRoot(InstallPathContext context, InstallScope scope) + { + return scope == InstallScope.Project + ? new DirectoryInfo(Path.Combine(context.ProjectRoot.FullName, ".junie")) + : new DirectoryInfo(Path.Combine(context.UserHome.FullName, ".junie")); + } +} diff --git a/tools/ManagedCode.DotnetSkills/Runtime/SkillInstallTarget.cs b/tools/ManagedCode.DotnetSkills/Runtime/SkillInstallTarget.cs index 29bd2d9..658b716 100644 --- a/tools/ManagedCode.DotnetSkills/Runtime/SkillInstallTarget.cs +++ b/tools/ManagedCode.DotnetSkills/Runtime/SkillInstallTarget.cs @@ -7,6 +7,7 @@ internal enum AgentPlatform Claude, Copilot, Gemini, + Junie, } internal enum InstallScope @@ -36,6 +37,7 @@ internal sealed record SkillInstallLayout( AgentPlatform.Claude => "Restart Claude Code or start a new session to pick up new skills.", AgentPlatform.Copilot => "Restart Copilot CLI or your IDE agent session to pick up new skills.", AgentPlatform.Gemini => "Run /skills reload or restart Gemini CLI to pick up new skills.", + AgentPlatform.Junie => "Restart Junie or reload the project to pick up new skills.", _ => "Restart your agent session to pick up new skills.", }; } @@ -77,7 +79,9 @@ public static SkillInstallLayout Resolve( "gemini" => AgentPlatform.Gemini, "google" => AgentPlatform.Gemini, "google-gemini" => AgentPlatform.Gemini, - _ => throw new InvalidOperationException("Unsupported agent: " + value + ". Expected auto, codex, openai, claude, anthropic, copilot, github-copilot, gemini, or google-gemini."), + "junie" => AgentPlatform.Junie, + "jetbrains" => AgentPlatform.Junie, + _ => throw new InvalidOperationException("Unsupported agent: " + value + ". Expected auto, codex, openai, claude, anthropic, copilot, github-copilot, gemini, google-gemini, junie, or jetbrains."), }; public static InstallScope ParseScope(string value) => value.ToLowerInvariant() switch