Skip to content

feat(junie): model the full subagent frontmatter field set - #1845

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-1821-junie-subagent-frontmatter
Jun 11, 2026
Merged

feat(junie): model the full subagent frontmatter field set#1845
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-1821-junie-subagent-frontmatter

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

First-classes the full documented frontmatter field set for Junie CLI custom subagents. rulesync's junie-subagent.ts declared only name/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. 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 round-trip through the rulesync junie: 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 only description (arguments are passed via $argumentName keywords in the body, not a frontmatter field). So junie-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

  • Expanded JunieSubagentFrontmatterSchema + unit tests (full field set, type rejection, round-trip).
  • docs/reference/file-formats.md subagent example gains a junie: block (skill docs synced).

Verification

  • pnpm cicheck:code passes (254 files, 6291 tests).

Part of #1821

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits June 10, 2026 20:14
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
dyoshikawa merged commit 9b395ea into main Jun 11, 2026
8 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-1821-junie-subagent-frontmatter branch June 11, 2026 03:40
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants