Repository navigation
UX, diagnostics, install and docs friction (incl. --stats) #21
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesttier-2Tier 2: UX and diagnosticsTier 2: UX and diagnostics
Description
Part of #14. Source: v0.10.0 dogfood report (2026-10-07).
Tier: 2
Bugs
| # | Sev | Issue | Repro | Expected |
|---|---|---|---|---|
| B13 | M | Tree-sitter warning prints on every default run of the crates.io build (because --truncate defaults to smart); suggested command is cargo build --features tree-sitter-all |
context-builder -d any |
Warn only for explicitly passed flags; suggest cargo install context-builder --features tree-sitter-all |
| B17 | L | Errors printed twice, in Debug format, without the path | -d /nope; -o /readonly/x.md → Error: Os { code: 13, kind: PermissionDenied, … } |
Print once with {}, naming the path; distinct exit codes for cancelled vs IO error (P14) |
| B18 | L | --max-tokens notice says mode: smart in builds without tree-sitter, but the cut is mid-line |
default build, --max-tokens 50000 |
Report the effective mode |
| B19 | L | Malformed or typo'd config silently ignored | filter = ["rs" → warning, exit 0, defaults used; filters = [...] → no warning |
Fail on parse error; warn on unknown keys |
| B21 | L | --token-count ignores --max-tokens |
--token-count --max-tokens 1000 → 924,288 |
Report the capped size and files omitted |
| B23 | L | install.sh verifies the wrong binary: runs context-builder --version from PATH, not $INSTALL_DIR (printed my cargo copy) |
CONTEXT_BUILDER_INSTALL_DIR=/tmp/x sh install.sh |
Run "$INSTALL_DIR/context-builder" --version; warn if not on PATH or shadowed |
Enhancements
- P7
--stats: per-file token breakdown (--stats/--top 20) that honors--max-tokensand shows what would be cut. Replace the bytes/4 post-run "~NK" estimate (off by −11% to −56%; requests ~1229K vs 2.8M actual) with the real count; the >128K warning should use it too. - P10 discoverability/install: make tree-sitter a default feature (+~10 s compile) or hide the tree-sitter flags when compiled out; add a musl/static Linux release (current binary needs
GLIBC_2.34); README says| bash, script header says| sh. --config <path>/--no-configto bypass a project'scontext-builder.toml(rest of P8).
Docs / friction (report §6)
- Bare
context-builderprints help (exit 0). README "Basic Usage" says it processes cwd. Make it process cwd or fix the README. -
-o -(stdout) is in the README but not in--help. - Hidden files are skipped and symlinks aren't followed or listed; document it (
--hiddenis in the v0.11.0 issue;--followis open). - Absolute paths leak into the header (
from the \/tmp/my proj ü/` directory`); use relative paths (P11). - Binary files become
<Binary file …>blocks in the body; omit from the body, keep marked in the tree (P11). Ripgrep without.githad 1,095 of these. - Skips and encoding fallbacks go through
log::warn!, invisible withoutRUST_LOG=warn. Env vars (CB_SILENT,CB_DEBUG_CONFIG,CB_DEBUG_AUTODIFF,CB_DIFF_CONTEXT_LINES,RUST_LOG) are only in DEVELOPMENT.md/AGENTS.md. - Diff format (
+/-with a space,...separator) can't be applied withpatch/git apply; state that it's LLM-oriented.
Covers B13, B17, B18, B19, B21, B23 and proposals P7, P10, P14, plus the non-default parts of P8 and P11.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesttier-2Tier 2: UX and diagnosticsTier 2: UX and diagnostics
Activity
igorls commentedon Oct 11, 2026
Progress: B13, B17, B18 in #49 (stacked on #44); B23 in #48. Not done: B19 (malformed config / unknown keys; hard-failing is a behavior change, needs a maintainer decision), B21 (
--token-countignoring--max-tokens),--stats/--top, real-tokenizer >128K warning,--config/--no-config, musl release, and the docs/friction checklist items.test: CountingWriter names the output file on failure (#21)
test: in-process --token-count budget cases (#21)
test: unit-test --config/--no-config selection and load_config_file (#21
fix: single readable errors, quieter tree-sitter notice, path in writ…
fix: quieter tree-sitter notice, single readable errors, effective tr…
fix: --token-count honors --max-tokens (#21 B21) (#55)
feat: --config <path> and --no-config (#21) (#56)
docs: README/help friction items from #21 (#57)
fix: malformed config is a hard error; warn on unknown keys (#21 B19) (…
feat: installer picks libc and verifies the installed binary (#21 P10…
feat: --stats per-file token breakdown; exact post-run token count (#21…
fix: skip binary files with a Skipped entry; header names the directo…