This document lists the major user-facing capabilities. README shows the short promotional version; this file keeps the fuller catalog.
Codexplain is English-first for global open-source defaults. It mirrors the user's language when the user writes in Korean or another language.
Feature What It Does
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TLDR Starts explanatory answers with the point
─────────────────────────────── ───────────────────────────────────────────
Width-safe table Wraps cells and inserts every row divider
─────────────────────────────── ───────────────────────────────────────────
Flow diagram Uses renderer-owned boxes and connectors
─────────────────────────────── ───────────────────────────────────────────
Architecture diagram Mandatory for architecture/structure asks
─────────────────────────────── ───────────────────────────────────────────
Pros/cons Compares options without dense prose
─────────────────────────────── ───────────────────────────────────────────
Formula box Shows simple scoring or tradeoff equations
─────────────────────────────── ───────────────────────────────────────────
Cause/effect report Separates root cause from visible symptom
─────────────────────────────── ───────────────────────────────────────────
Progress UI Reports phase, bar, evidence, and next step
─────────────────────────────── ───────────────────────────────────────────
Notion-style blocks Adds quote, divider, toggle, and callout cues
─────────────────────────────── ───────────────────────────────────────────
Semantic color Highlights only meaningful states and refs
Bare codexplain, codexplain settings, and codexplain settings-ui open the
same dependency-free terminal UI. It presents settings by capability, not file
path, and works in ordinary Windows, macOS, and Linux terminals.
Setting Area Choices
━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Explanation depth light, standard, deep
──────────────────────── ────────────────────────────────────────────────
Architecture view overview, system, internals
──────────────────────── ────────────────────────────────────────────────
Abstraction level concrete, architecture, strategy
──────────────────────── ────────────────────────────────────────────────
Theme ocean, forest, warm, sunset, grape, slate, rose,
mono, none
──────────────────────── ────────────────────────────────────────────────
UX density 35, 65, 90 presets for how many UX blocks appear
──────────────────────── ────────────────────────────────────────────────
Emoji cues on, off
──────────────────────── ────────────────────────────────────────────────
Color mode ansi, plain, html
──────────────────────── ────────────────────────────────────────────────
Scope session, project-local, global guidance, off
Teams can add explanation patterns without changing Rust code.
codexplain style add research-card \
--trigger "research card" \
--renderers "tldr,table,formula" \
--tone "research" \
--description "Separate background, evidence, limitations, and next action." \
--example "Explain this design as a research card"
codexplain style list
codexplain style preview research-card
codexplain style remove research-cardCustom styles are stored under .codexplain/styles/ and remain project-local
unless the user explicitly manages a global guidance block.
Codexplain uses semantic-sparse color. Highlighting is a task-relevance cue, not a decoration layer.
Role Intended Meaning
━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
border Table, box, and flow structure
────────────────────── ───────────────────────────────────────────────
heading TLDR and structural section labels
────────────────────── ───────────────────────────────────────────────
success PASS, DONE, APPROVED, completed
────────────────────── ───────────────────────────────────────────────
warning risk, warning, drift, regression, required
────────────────────── ───────────────────────────────────────────────
danger FAIL, blocked, unsafe, OOM, error
────────────────────── ───────────────────────────────────────────────
command/path/artifact exact commands, paths, JSON/code/diff/log/test
The rule is intentionally strict: color should improve attention, not make the whole answer rainbow-colored. Ordinary nouns such as "renderer", "architecture", "Codexplain", and "TUI" are not colored inside normal prose unless they appear as structural labels.
The current highlight policy is a conservative baseline, not a claim of final optimality. It highlights meaning-bearing tokens only when they affect user attention or copy/paste safety.
Signal group Why it gets color
━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Outcome PASS, FAIL, DONE, blocked, approved
──────────────────────── ─────────────────────────────────────────────
Risk warning, drift, regression, unsafe, OOM
──────────────────────── ─────────────────────────────────────────────
Exact artifact JSON, code, diff, patch, log, test output
──────────────────────── ─────────────────────────────────────────────
Action commands, flags, install/off/check commands
──────────────────────── ─────────────────────────────────────────────
Location paths, config files, managed state
The next improvement should be a context score: color only the highest-signal terms per section, suppress repeated terms, and prefer outcome/risk/action over generic technical nouns.
Emoji cues are enabled by default and make explanations scannable before the reader processes every word. They are semantic markers, not random decoration.
Emoji Meaning
━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 overview, architecture, direction
────── ─────────────────────────────────────────────
✅ success, pass, complete
────── ─────────────────────────────────────────────
⚠️ warning, risk, regression
────── ─────────────────────────────────────────────
🚨 danger, fail, blocked, unsafe
────── ─────────────────────────────────────────────
🔎 evidence, inspection, verification
────── ─────────────────────────────────────────────
🛠️ fix, command, implementation action
────── ─────────────────────────────────────────────
🚀 next step, release, launch
Use emojis actively at section and item boundaries, but always keep the text label. Exact artifacts such as JSON, code, diffs, logs, tests, and patches stay unchanged.
When emoji cues are enabled, normal chat explanations are emoji-first by contract. Major sections must use semantic emoji labels with text labels unless strict artifact preservation or a higher-priority host instruction requires otherwise. Markdown remains available for exact code fences, file links, compact tables, and renderer fallbacks, but it is not the primary explanation style. Codexplain guidance also installs a response-shape self-check: outcome first, semantic sections present, emoji labels present when enabled, exact artifacts preserved, and no unnecessary Markdown-heavy scaffolding.
cargo fmt --check
cargo test
./bin/codexplain quality-check --width 88
./bin/codexplain compat-check
./bin/codexplain storage-check --min-free-gb 5The quality check fails on overflowing renderer output, missing body row dividers, broken flow connectors, sparse architecture diagrams, and missing numbered decomposition for two-path/process answers.
Codexplain-rendered tables always separate body rows. If a non-strict answer contains a hand-drawn Unicode table with a header divider but no body row dividers, Codexplain post-processing inserts row separators between adjacent body rows.
Before After
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ row 1 │ value │ │ row 1 │ value │
│ row 2 │ value │ ├───────┼───────┤
│ row 2 │ value │
Strict artifacts are still preserved. JSON, code, diffs, patches, logs, tests, and commit messages bypass this table repair path.