Skip to content

fix(junie): import subagents without description and keep hook strictJsonOutput - #3892

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3888-junie-upstream
Nov 19, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3888-junie-upstream

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Refs #3888

Summary

Follows two of the JetBrains Junie upstream changes listed in #3888.

  • subagents: description is now optional in JunieSubagentFrontmatterSchema, matching the subagents docs. On import, a missing description takes Junie's own fallback: the first non-heading body paragraph, truncated to 1,024 characters. A file with no paragraph imports with no description, which the canonical subagent schema already allows. Before this change, importing such an agent aborted the run. When name is missing, the name comes from the file name without .agent.md or .md, so ok.agent.md now imports as ok, as in Junie.
  • hooks: strictJsonOutput is a new canonical boolean hook field, passed through as-is for Junie (~/.junie/config.json). Before, a round trip dropped it (hooks docs). It is documented in docs/reference/file-formats.md.
  • The paragraph extraction used by Junie skills moved to src/utils/markdown-paragraph.ts, so subagents use the same code. Skills behave the same as before.

Remaining items in #3888 (not in this PR)

  • Scanning one subdirectory level for Junie subagents (excluding skills/) and for Junie commands. This changes processor discovery and the output paths of nested files, so it needs a design decision.
  • Junie's name normalization (lowercase, whitespace to -, [a-z0-9][a-z0-9_-]*).

Tests

  • Unit tests cover: description derivation and truncation, a file without frontmatter or a paragraph, .agent.md name stripping, strictJsonOutput in both directions, and the new util.
  • pnpm cicheck passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 20, 2026 00:02
…JsonOutput

Junie now documents `description` as optional for subagents, falling back
to the first non-heading body paragraph truncated to 1,024 characters, and
strips `.agent.md` as well as `.md` when deriving a name. Importing such an
agent aborted the run; it now applies the same fallback. The paragraph
extraction shared with Junie skills moves to a small util.

Junie hooks also gained a per-hook `strictJsonOutput` flag. Add it as a
canonical boolean field and pass it through the Junie converter so a
round trip no longer drops it.

Refs #3888

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Address review: a YAML null or blank `description` now takes the body
fallback instead of aborting or importing empty, the one-line skill
wrapper is inlined, and the `continueOnBlock` docs name CodeBuddy Code.

Refs #3888

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…nie-upstream

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit 0864047 into main Nov 19, 2026
14 of 15 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3888-junie-upstream branch November 19, 2026 16:34
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.

1 participant