Repository navigation
feat(junie): read one subdirectory level of agents and commands - #3983
Merged
Merged
Conversation
Junie treats Markdown files in its agent and command directories and their immediate subdirectories as definitions (agents except `skills/`). Generate, import and orphan-sweep one nested level for the junie target, skip deeper sources and `skills/` agents with a warning, name nested agents after their file alone, and warn when two Junie commands share a file name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
The shared .agents/ root also holds other tools' trees (commands/, workflows/, ...), so reading it one level deep imported those files as Junie subagents. Read nested agents only under .junie/agents/, document that --delete now sweeps one nested level, and share one depth helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Keep both the Junie nesting meta and the new maxSubagents setting; regenerate docs content. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…nie-nested # Conflicts: # src/generated/docs-content.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finishes #3888. The optional
description,strictJsonOutputand name-normalization items already landed (#3892, #3943, #3946); this PR adds the last one: Junie reads one subdirectory level of subagents and commands.Upstream (re-checked 2026-11-26):
skills/directories." The name comes from frontmatternameor "the file name without the.mdor.agent.mdextension".Changes
maxNestingDepthandexcludedSubdirectoriesfactory meta, andfilePatternmay now be a list of globs. Junie uses["*.md", "*/*.md"],supportsNestedPaths: true,maxNestingDepth: 1,excludedSubdirectories: ["skills"]..rulesync/subagents/review/security.md->.junie/agents/review/security.md). Sources nested deeper, or underskills/, are skipped with a warning..junie/agents/and its immediate subdirectories, leaving outskills/. The import-only shared.agents/root stays flat (*.md, newimportOnlyRootFilePatternmeta).review/security.mdissecurityand notreview/security.maxSubdirectoryDepthmeta. Junie switches tosupportsSubdirectory: truewith depth 1, so import and the sweep glob["*.md", "*/*.md"]and deeper sources are skipped with a warning on generate.commit.mdandgit/commit.mdare both/commit). This follows the existing Letta Code hook.docs/reference/file-formats.md(subagents and commands), plus regenerated docs content.skills/in both roots, the orphan sweep, nested naming and the duplicate-name warnings.Design decisions
.rulesync/<feature>/<dir>/<name>.md<->.junie/<feature>/<dir>/<name>.mdround-trips without a new naming scheme..agents/root is imported flat. Junie also reads one nested level there, but.agents/holds other tools' trees (.agents/commands/,.agents/workflows/,.agents/skills/), and reading them would import those files as subagents. Nested Junie agents belong in.junie/agents/. (Changed after review.)--deletenow sweeps one nested level of.junie/agents/and.junie/commands/, so hand-written files there that no rulesync source produces are removed. The docs say so.skills/is excluded only at the top level of each agent root. With a depth cap of 1, that is the only place askills/directory can hold an agent file that Junie would otherwise read.validateRulesyncCommandshook, as in Letta Code, and not behind a new processor flag. It ignores commands nested deeper than Junie reads, because those are skipped anyway..gitignorechange: the existing.junie/agents/and.junie/commands/entries already cover the subdirectories.Skipped items
None.
Closes #3888
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4