Skip to content

Commit 2bbea2c

Browse files
marcnuluclaude
andcommitted
Complete separator-merge feature documentation and test cases
- Add multi-separator merge section to README.md - Document decomposition/recomposition scenarios - Add 30+ real-world test cases (XSLT, JSON, configs, docs) - Add 26+ multi-separator (3+) test cases - Document 3+ separator behavior and edge cases - Update feature status to COMPLETE - Bump version to 0.1.13 Feature enables cross-domain entity tracking: - Merge docs (dots) + src (underscores) into unified view - Gap analysis with --show-sep markers - Normalization with --sep-replace-default - Support for unlimited separators (tested to 6) Use cases: living docs, polyglot projects, config management, build pipelines, multi-language navigation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 950c37b commit 2bbea2c

8 files changed

Lines changed: 2192 additions & 56 deletions

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "recur"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
edition = "2021"
55
authors = ["User Level Up Contributors"]
66
description = "Recursive hierarchical search tool for modern codebases - Honoring Dennis Ritchie's 1968 thesis (58 years of recursive hierarchies)"

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>recur</h1>
3-
<div class="version">v0.1.12</div>
3+
<div class="version">v0.1.13</div>
44
<p>
55
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
66
<a href="https://www.rust-lang.org/"><img alt="Rust 1.70+" src="https://img.shields.io/badge/rust-1.70%2B-blue.svg"></a>
@@ -108,12 +108,14 @@ recur stats "ServiceName" -l 1
108108

109109
### Core capabilities
110110
- **Hierarchy-aware pattern matching** with `*` and `**` wildcards
111+
- **Multi-separator merge** — unify results across naming conventions (`.` and `_`)
111112
- **Scoped text search** within a hierarchy (grep-like, but structure-aware)
112113
- **Context lines** via `-C` (show surrounding lines like `grep -C`)
113114
- **Tree visualization** using Unicode box-drawing characters
114115
- **Related file discovery** (siblings within the hierarchy)
115116
- **Identifier search** (dot-notation identifiers in code)
116117
- **Hierarchy statistics** with depth analysis and pagination
118+
- **Cross-domain gap analysis** — verify completeness across representations
117119
- **Multiple output formats** (human-friendly terminal output, plus JSON for tooling)
118120
- **Proper exit codes** (0=success, 1=no results, 2=error)
119121

@@ -124,6 +126,30 @@ recur stats "ServiceName" -l 1
124126
- `--json` - Output results as JSON
125127
- `--color` - Colorized output (auto-detected)
126128

129+
### Multi-separator merge (Cross-domain entity tracking)
130+
**Problem:** Documentation uses dots (`api.user.service.md`), source code uses underscores (`api_user_service.rs`). Traditional tools can't unify them.
131+
132+
**Solution:** Use multiple `--sep` flags to merge results across naming conventions:
133+
```bash
134+
# Merge documentation (dots) + source code (underscores)
135+
recur tree main --sep "." --sep "_"
136+
137+
# Show which domain each file comes from (gap analysis)
138+
recur tree main --sep "." --sep "_" --show-sep
139+
140+
# Normalize output to consistent separator
141+
recur files "main.command.**" --sep "." --sep "_" --sep-replace-default "."
142+
```
143+
144+
**Use cases:**
145+
- **Living documentation** — verify code has matching docs/tests
146+
- **Polyglot projects** — navigate TypeScript (`.`) + Python (`_`) + Go (`/`) as one
147+
- **Configuration management** — track configs across file (`.`) and env-var (`_`) conventions
148+
- **Build pipelines** — verify artifact completeness across naming conventions
149+
- **Gap analysis**`--show-sep` marks each file's origin: `[.]` or `[_]`
150+
151+
See [`docs/main.trait.separator-merge.readme.md`](docs/main.trait.separator-merge.readme.md) for details.
152+
127153
## Commands
128154

129155
### `recur files` — find files by hierarchical pattern
@@ -133,6 +159,11 @@ recur files "Controller.**" # All descendants (recursive)
133159
recur files "*.Tests" --ext .cs # Test files only
134160
recur files "Module.*" --count # Show count only
135161
recur files **.AutoSave.** -i -e cs # No quotes needed with stdin stdout
162+
163+
# Multi-separator merge (cross-domain)
164+
recur files "main.**" --sep "." --sep "_" # Merge docs + src
165+
recur files "api.user.**" --sep "." --sep "_" --show-sep # With markers
166+
recur files "config.**" --sep "." --sep "_" --sep-replace-default "." # Normalized
136167
```
137168

138169
### `recur find` — search text within a hierarchy scope
@@ -149,6 +180,11 @@ recur tree "ServiceName" # Unicode tree view
149180
recur tree "ServiceName" --count # With file counts
150181
recur tree "ServiceName" --ascii # ASCII-only (no Unicode)
151182
recur tree "ServiceName" --json # JSON output
183+
184+
# Multi-separator merge (cross-domain)
185+
recur tree "main" --sep "." --sep "_" # Merge docs + src
186+
recur tree "main" --sep "." --sep "_" --show-sep # With domain markers
187+
recur tree "api" --sep "." --sep "_" --sep-replace-default "." # Normalized
152188
```
153189

154190
### `recur related` — find sibling files

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a.0.1.12
1+
a.0.1.13

0 commit comments

Comments
 (0)