fix(codegen): emit @description in header JSDoc without categorization#122
Merged
Conversation
create_tool_context() now falls back short_description to the tool's own description when no LLM categorization is available, so the generated header JSDoc always includes @description. Previously this tag was omitted on the plain generate CLI path, causing the skill command to fall back to uninformative "{tool_name} tool" placeholders in SKILL.md. Also documents that ToolContext.input_schema always holds the JSDoc-sanitized schema (already the case since PR #100) and adds a regression test locking in that invariant. Closes #94, closes #102
bug-ops
enabled auto-merge (squash)
July 9, 2026 14:31
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
create_tool_context()now falls backshort_descriptionto the tool's owndescriptionwhen no LLM categorization is provided, so the generated header JSDoc always includes@description. Fixes the plaingenerateCLI path producing SKILL.md files with uninformative"{tool_name} tool"placeholders (codegen: CLI-generated TS files omit @description in header JSDoc, causing skill to show uninformative tool names #94).ToolContext.input_schemaalways holds the JSDoc-sanitized schema and adds a regression test locking in that invariant. Investigation confirmed the sanitize call already predates this branch (introduced in PR fix(codegen): sanitize progressive JSDoc metadata #100, commit 7b4c953) — no production code change was needed for codegen: ToolContext.input_schema holds unsanitized schema clone #102, only documentation and test coverage to close the gap the issue described (codegen: ToolContext.input_schema holds unsanitized schema clone #102).Test plan
cargo +nightly fmt --checkcargo +stable clippy --all-targets --all-features --workspace -- -D warningscargo nextest run --all-features --workspace --no-fail-fast(659/659 passed)cargo test --doc --all-features --workspacetest_create_tool_context_without_categorization_falls_back_to_description,test_create_tool_context_input_schema_is_sanitizedCloses #94
Closes #102