Skip to content

Commit cde9ad3

Browse files
authored
docs: Improve README, CLI UX, and documentation accuracy (#147)
## Summary Overhaul user-facing documentation and CLI polish. Rewrites README with badges and user-focused structure, fixes stale docs (wrong MSRV, fictional CLI flags, incorrect exit codes), improves CLI UX from review findings, and simplifies Mergify merge queue config. **20 files changed** (452 additions, 633 deletions -- net reduction of 181 lines) ## What changed ### README rewrite - Badge rows with link references at bottom (license, sponsors, CI, deps, codecov, issues, last commit, scorecard) -- all `flat-square`, modeled after libmagic-rs/dbsurveyor - User-focused structure: Quick Start and Usage before contributor content - Merged duplicate Features sections, removed "Problem with strings" / "Advantages Over" redundancy - Added stdin support example, release verification, Security section ### Documentation fixes - **`docs/src/installation.md`**: Fixed MSRV from 1.70 to 1.91, removed fictional Docker section, added Releases page link, added `just` dev workflow - **`docs/src/performance.md`**: Complete rewrite -- removed 20+ fictional CLI flags (`--mmap-threshold`, `--no-mmap`, `--sections`, `--timing`, `--no-classify`, etc.), fictional env vars (`STRINGY_MAX_MEMORY`, `STRINGY_THREADS`), and fictional config format - **`docs/src/cli.md`**: Fixed exit codes from 0/1/2 to 0/1/2/3/4 matching `StringyError::exit_code()` - **`docs/src/quickstart.md`**: Added 4 missing tags to semantic tags table (demangled, version, manifest, resource) -- now covers all 21 tags ### CLI improvements (from `/cli-review`) - **Removed `-e` short flag** from `--enc` (infrequent flag per GOTCHAS.md convention) - **Added EXIT CODES section** to `--help` output (0=success, 1=general, 2=config, 3=not found, 4=permission denied) - **Converted `cli_encoding_to_filter()`** to `impl From<CliEncoding> for EncodingFilter` (idiomatic Rust) - **Improved filter-no-match diagnostic**: now suggests adjusting `--min-len`, `--only-tags`, `--no-tags`, or `--enc` ### Mergify simplification - 3 queues: dosubot (quality only), dependabot (full CI), default (manual `/queue` for human PRs) - Removed label requirements (lgtm, do-not-merge), author restrictions, and workflow file detection - Auto-approve rules for both bots, keep-PRs-up-to-date rule retained ### Tests (7 new tests) - `tests/integration_cli_stdin.rs` (6 tests): PE, Mach-O, unknown format, JSON output, raw mode, and filtered mode via stdin - `tests/integration_cli.rs`: exit codes help text validation - `tests/integration_flow8_diagnostics.rs`: tightened filter-no-match assertion to verify hint text ### Tooling config - Tessl MCP server configuration and skill files - `.gitignore` for tessl-generated files ## Breaking changes **`-e` short flag removed**: Scripts using `stringy -e ascii` must change to `stringy --enc ascii`. The long form `--enc` is unchanged. ## Test plan - [x] `cargo nextest run` -- 617 passed, 0 failed, 23 skipped - [x] `cargo clippy --all-targets --all-features -- -D warnings` -- clean - [x] `cargo fmt --all -- --check` -- clean - [x] `just ci-check` -- all stages pass (pre-commit, fmt, clippy, tests, coverage, dist plan) - [ ] Verify badges render correctly on GitHub after merge - [ ] Verify `stringy --help` shows EXIT CODES section - [ ] Verify `--enc` no longer accepts `-e` short form --------- Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
1 parent c9a466f commit cde9ad3

20 files changed

Lines changed: 454 additions & 633 deletions

.codex/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[mcp_servers.tessl]
2+
type = "stdio"
3+
command = "tessl"
4+
args = [ "mcp", "start" ]

.cursor/mcp.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"mcpServers": {
3+
"tessl": {
4+
"type": "stdio",
5+
"command": "tessl",
6+
"args": [
7+
"mcp",
8+
"start"
9+
]
10+
}
11+
}
12+
}

.gemini/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"mcpServers": {
3+
"tessl": {
4+
"type": "stdio",
5+
"command": "tessl",
6+
"args": [
7+
"mcp",
8+
"start"
9+
]
10+
}
11+
}
12+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,8 @@ tests/fixtures/*
141141

142142
# Git worktrees
143143
.worktrees/
144+
145+
146+
# tessl-generated files
147+
**/tessl__*
148+
.tessl/tiles/

.mcp.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"mcpServers": {
3+
"tessl": {
4+
"type": "stdio",
5+
"command": "tessl",
6+
"args": [
7+
"mcp",
8+
"start"
9+
]
10+
}
11+
}
12+
}

.mergify.yml

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
queue_rules:
2+
# Dosubot: only needs quality (fmt + clippy) to pass
3+
- name: dosubot
4+
merge_method: squash
5+
autoqueue: true
6+
queue_conditions:
7+
- author = dosubot[bot]
8+
- base = main
9+
merge_conditions:
10+
- check-success = quality
11+
12+
# Dependabot: full CI required
13+
- name: dependabot
14+
merge_method: squash
15+
autoqueue: true
16+
queue_conditions:
17+
- author = dependabot[bot]
18+
- base = main
19+
merge_conditions:
20+
- check-success = quality
21+
- check-success = msrv (stable)
22+
- check-success = msrv (stable minus 1 releases)
23+
- check-success = msrv (stable minus 2 releases)
24+
- check-success = msrv (stable minus 3 releases)
25+
- check-success = msrv (stable minus 4 releases)
26+
- check-success = test
27+
- check-success = test-cross-platform (ubuntu-latest, Linux)
28+
- check-success = test-cross-platform (macos-latest, macOS)
29+
- check-success = test-cross-platform (windows-latest, Windows)
30+
- check-success = coverage
31+
32+
# Human PRs: manually enqueued via /queue command (repo permissions restrict to maintainers)
233
- name: default
334
merge_method: squash
35+
queue_conditions:
36+
- base = main
37+
- author != dependabot[bot]
38+
- author != dosubot[bot]
439
merge_conditions:
540
- check-success = quality
641
- check-success = msrv (stable)
@@ -13,58 +48,50 @@ queue_rules:
1348
- check-success = test-cross-platform (macos-latest, macOS)
1449
- check-success = test-cross-platform (windows-latest, Windows)
1550
- check-success = coverage
51+
1652
pull_request_rules:
17-
- name: Queue maintainer PRs with lgtm label
53+
- name: Auto-approve dosubot PRs
54+
description: Approve dosubot PRs so they can proceed through the queue
1855
conditions:
1956
- base = main
20-
- author=@maintainers
21-
- label = lgtm
22-
- label != do-not-merge
57+
- author = dosubot[bot]
2358
actions:
24-
queue:
25-
name: default
26-
- name: Auto-approve and queue dependabot PRs
59+
review:
60+
type: APPROVE
61+
message: Automatically approved by Mergify
62+
63+
- name: Auto-approve dependabot PRs
64+
description: Approve dependabot PRs so they can proceed through the queue
2765
conditions:
2866
- base = main
2967
- author = dependabot[bot]
30-
- label != do-not-merge
31-
- -files~=\.github/workflows/release\.yml
3268
actions:
3369
review:
3470
type: APPROVE
3571
message: Automatically approved by Mergify
36-
queue:
37-
name: default
38-
- name: Queue external PRs when approved by maintainer
39-
conditions:
40-
- base = main
41-
- -author=@maintainers
42-
- author != dependabot[bot]
43-
- approved-reviews-by=@maintainers
44-
- label != do-not-merge
45-
actions:
46-
queue:
47-
name: default
72+
4873
- name: Keep PRs up to date with main
4974
conditions:
5075
- base = main
5176
- -conflict
5277
- -draft
53-
- label != do-not-merge
5478
actions:
5579
update: {}
80+
5681
merge_protections:
5782
- name: Enforce conventional commit
5883
description: Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
5984
if:
6085
- base = main
86+
- author != dependabot[bot]
87+
- author != dosubot[bot]
6188
success_conditions:
6289
- "title ~=
6390
^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\
6491
\\))?:"
65-
- name: CI must pass
66-
description: All CI checks must pass. This protection prevents manual merges
67-
that bypass the merge queue.
92+
93+
- name: Full CI must pass
94+
description: All CI checks must pass. This protection prevents manual merges that bypass the merge queue.
6895
if:
6996
- base = main
7097
success_conditions:
@@ -79,6 +106,7 @@ merge_protections:
79106
- check-success = test-cross-platform (macos-latest, macOS)
80107
- check-success = test-cross-platform (windows-latest, Windows)
81108
- check-success = coverage
109+
82110
- name: Do not merge outdated PRs
83111
description: Make sure PRs are within 10 commits of the base branch before merging
84112
if:

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Use idiomatic `clap` derive API patterns. Push validation into clap wherever pos
6767
| `--no-tags` | | `Vec<Tag>` | Repeatable, runtime overlap check with `--only-tags` |
6868
| `--min-len` | `-m` | `Option<usize>` | Custom parser enforces >= 1 |
6969
| `--top` | `-t` | `Option<usize>` | Custom parser enforces >= 1 |
70-
| `--enc` | `-e` | `Option<CliEncoding>` | ascii, utf8, utf16, utf16le, utf16be |
70+
| `--enc` | | `Option<CliEncoding>` | ascii, utf8, utf16, utf16le, utf16be |
7171
| `--raw` | | bool | Conflicts with `--only-tags`, `--no-tags`, `--top`, `--debug`, `--yara` |
7272
| `--summary` | | bool | Conflicts with `--json`, `--yara`; runtime TTY check |
7373
| `--debug` | | bool | Conflicts with `--raw` |

GOTCHAS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ Changing default values in `ExtractionConfig::default()` requires updating asser
2929
- `--raw` mode performs extraction only and then early-exits: ranking, normalization, and pipeline-level classification are skipped. `tags` are cleared, `score` is forced to 0, and `display_score` is set to `Some(0)`. `assert_cmd` tests run piped (non-TTY); use `format_table_with_mode(&strings, &metadata, true)` to test TTY table rendering
3030
- Exit codes are typed: 0=success, 2=config/validation error, 3=file not found, 4=permission denied, 1=other. Tests asserting exit codes must match `StringyError::exit_code()` in `types/error.rs`
3131
- `--no-tags` is the canonical flag name (kebab-case). Previously was `--notags` -- update all references when touching CLI flag names
32-
- Short flags: `-j` (json), `-m` (min-len), `-t` (top), `-e` (enc). Do not add short flags for infrequent flags (--yara, --raw, --summary, --debug)
32+
- Short flags: `-j` (json), `-m` (min-len), `-t` (top). Do not add short flags for infrequent flags (--enc, --yara, --raw, --summary, --debug)
3333
- `NO_COLOR` env var disables progress spinner. The spinner is also hidden when stderr is not a TTY
34+
- Clap derive attributes (`long_help`, `about`, etc.) require string literals -- `const` values and `concat!` with consts do not work. The `cli_help_lists_all_canonical_tags` test in `integration_cli.rs` verifies help text stays in sync with `Tag::from_str()`
3435

3536
## Dependencies
3637

0 commit comments

Comments
 (0)