LLM Ā· sync
code-explain
Explain code, tuned to audience and focus.
Intermediate explanation
About
code-explain is the LLM-wrapper version of 'rubber-duck explain this code'. Designed to be useful at four different reader levels:
⢠`beginner` ā defines jargon, walks line-by-line ⢠`intermediate` (default) ā assumes language fluency, explains the codebase-specific bits ⢠`senior` ā leads with architectural shape and trade-offs, skips basics ⢠`tech-lead` ā leads with risks and review-blocker concerns
Returns `explanation` (multi-paragraph prose) + `bullets[]` (the 3-7 most important takeaways extracted from the explanation).
Claude Sonnet internally for the structured-output reliability. Accepts code up to 60k chars (~15k tokens at typical density).
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"maxLength": 60000
},
"language": {
"type": "string",
"maxLength": 32
},
"audience": {
"type": "string",
"enum": [
"beginner",
"intermediate",
"senior",
"tech-lead"
],
"default": "intermediate"
},
"focusOn": {
"type": "string",
"maxLength": 200
}
}
}These are descriptive previews. Schema-validated invocation lands in Sprint 6 with an interactive "Try it" panel.
Reviews (0)
No reviews yet ā be the first to share your experience.