/wbExplain — Command Hub
/wbExplain produces detailed, depth-controlled explanations of code — from ELI5 plain-language summaries to expert architectural deep-dives. It works on plan rows (explain a task before executing), on folders (understand a subsystem), and on arbitrary natural-language questions. Every explanation is grounded in actual code, cites file paths and line numbers, and is saved as a versioned artifact rather than ephemeral chat.
🎯 Strategic Position
/wbExplain is the "read before you write" gate. It bridges the gap between a vague plan row and a confident /wbWork invocation. It also serves onboarding — giving new contributors structured understanding of the codebase at their chosen depth level.
- Before
/wbWork— explain a task row so you execute with confidence. - Before touching a subsystem — understand how it works before making changes.
- For onboarding — batch-explain all open tasks at a contributor's language and depth.
🛠️ Operating Modes
| Mode | Trigger | Output |
|---|---|---|
| Plan-row | /wbExplain plan.md --id=1 --as=eli5 | Task explanation with summary + deep dive + recommended approach |
| Subsystem | /wbExplain packages/wb-core/ "How does...?" --as=expert | Deep dive on a folder, citing file paths and line numbers |
| Multi-persona | /wbExplain plan.md --id=1 --as=eli5,fr,ar | Multi-language explanation in one file |
| Wildcard batch | /wbExplain packages/wb-core/ * --as=expert | One explanation per open task row |
✅ What a useful explanation contains
- A high-level summary — what this code or task is about.
- A deep dive with file paths and line numbers from actual code.
- A recommended approach (for plan-row mode) — structured steps for
/wbWork. - Source grounding — cites real code, not invented examples.
- Smart-merge — if the same slug was already explained today, appends to existing file.
🚫 What it cannot do
| Not this | Use instead |
|---|---|
| Modify code — it only explains | /wbWork |
| Audit code quality | /wbAudit |
| Generate documentation | /wbDoc |
| Trace bug root causes | /wbDebug |
Batch wildcard (*) is for onboarding, not a daily ritual. If every plan row feels vague enough to need batch-explaining, the problem is the plan rows — rewrite them in /wbPlan.
📚 Reading Order
- ELI5 ⏳ — the one-paragraph mental model.
- Practical ⏳ — step-by-step walkthrough on a real project.
- Expert ⏳ — architecture, edge cases, and when NOT to use.
- Examples — annotated explanation transcripts (part 1 · 2).
- Exhaustive simulation · Live demo.
🔗 Related
wbExplain.md— the command reference this hub orients you around./wbWork— execute tasks after understanding them; integrates/wbExplainvia--asflag./wbDebug— debug after understanding the code; use/wbExplainfirst.
Quick Reference
/wbExplain plan_wb-core_20260503.md --id=1 --as=eli5 # explain one task
/wbExplain packages/wb-core/ "How does WBC.js work?" --as=expert # subsystem deep dive
/wbExplain plan.md --id=1 --as=eli5,fr,ar # multi-language
/wbExplain packages/wb-core/ * --as=expert # batch onboarding← Home · Commands · Install | wb-flow on npm · flow.wbc-ui.com · wi-bg.com
