feat(junie): model the full subagent frontmatter field set - #1845
Merged
dyoshikawa merged 2 commits intoJun 11, 2026
Conversation
Junie CLI custom subagents support a documented frontmatter set (tools, disallowedTools, mcpServers, model, reasoningLevel, maxTurns, skills, allowPromptArgument) that rulesync's junie-subagent.ts declared only as name/description (the rest rode through the loose object untyped). First-class these fields so they are typed and validated (e.g. maxTurns is a number, allowPromptArgument a boolean), mirroring the claudecode adapter; the schema stays loose for forward compatibility and list fields accept a string or an array. The fields continue to round-trip through the rulesync junie section. Verified against Junie's docs that custom slash command frontmatter supports only 'description' (the inferred argument-hint/model/allowed-tools fields are not supported), so junie-command.ts needs no change. The additional .agents/~/.agents subagent discovery roots are a separate follow-up (they need multi-root import-discovery support in the processor). Part of #1821. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nie skills example) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dyoshikawa
deleted the
resolve-scrap-issue-1821-junie-subagent-frontmatter
branch
June 11, 2026 03:40
Owner
Author
|
@dyoshikawa Thank you! |
This was referenced Jun 11, 2026
This was referenced Jul 31, 2026
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
First-classes the full documented frontmatter field set for Junie CLI custom subagents. rulesync's
junie-subagent.tsdeclared onlyname/description; the other documented fields rode through the loose object untyped.This addresses the subagent half of #1821. The command half is resolved by confirmation (see below).
Subagent frontmatter
Per Junie's docs, the supported fields are:
name,description,tools,disallowedTools,mcpServers,model,reasoningLevel(low/medium/high),maxTurns,skills,allowPromptArgument. These are now first-class and typed (e.g.maxTurnsis a number,allowPromptArgumenta boolean), mirroring the claudecode adapter. The schema stays loose for forward compatibility, and list fields accept a string or an array. The fields round-trip through the rulesyncjunie:section.Command frontmatter — confirmed, no change needed
The maintainer flagged the command fields (
argument-hint/model/allowed-tools) as needing confirmation. I verified against Junie's custom slash commands docs: command frontmatter supports onlydescription(arguments are passed via$argumentNamekeywords in the body, not a frontmatter field). Sojunie-command.ts(already{ description? }) needs no change — the inferred fields are not real.Deferred
The additional subagent discovery roots —
.agents/(project) and~/.junie/agents/,~/.agents/(user) — are a separate follow-up: the subagents processor scans a single directory per tool (getSettablePaths), so multi-root import discovery needs processor-level support. Noted on #1821.Changes
JunieSubagentFrontmatterSchema+ unit tests (full field set, type rejection, round-trip).docs/reference/file-formats.mdsubagent example gains ajunie:block (skill docs synced).Verification
pnpm cicheck:codepasses (254 files, 6291 tests).Part of #1821
🤖 Generated with Claude Code