@@ -150,32 +150,36 @@ $ smart-tree --max-lines 15
150150
151151## Key Features
152152
153- [ TODO: Add section]
153+ - ** Smart Directory Scanning** : Efficient recursive directory traversal with gitignore support
154+ - ** Configurable Output** : Control display using max-lines, dir-limit, and sorting options
155+ - ** Intelligent Folding** : Automatically collapses system directories like .git and node_modules
156+ - ** Rich Metadata Display** : Shows file sizes, modification times, and directory statistics
157+ - ** Context-Aware Output** : Maintains context by showing "X more items" summary for large folders
158+ - ** Multiple Sort Options** : Sort by name, size, or modification time with directory grouping
154159
155160## Design Philosophy
156161
157162Smart Tree is built around several key principles:
158163
159- [ TODO: Expand each principle with examples and rationales]
160-
1611641 . ** Information Density Over Completeness**
162165
163- - Why showing everything isn't always helpful
164- - How we choose what to show and what to fold
166+ - Showing every file in large directories rarely helps and often obscures important information
167+ - Smart Tree prioritizes the most relevant files (newest, largest) while summarizing the rest
168+ - System directories (.git, target, node_modules) are automatically folded to reduce noise
165169
1661702 . ** Context Preservation**
167171
168- - Maintaining useful information even with strict limits
169- - Balancing between overview and details
172+ - Even with strict line limits, Smart Tree maintains directory structure context
173+ - When showing only a subset of files, summaries indicate what's not shown
174+ - Important metadata (sizes, counts, timestamps) help maintain context even in compact views
170175
171- 3 . ** Smart Defaults**
172- - Why certain system directories are auto-folded
173- - Default limits and their reasoning
176+ 3 . ** Smart Defaults with Configurability**
177+ - Sane defaults make the tool immediately useful without configuration
178+ - Common system directories are auto-detected and folded
179+ - All aspects can be customized through command-line options (sorting, line limits, directory limits)
174180
175181## Technical Details
176182
177- [ TODO: Expand each section with code examples and diagrams where appropriate]
178-
179183### Architecture
180184
1811851 . ** Core Components**
@@ -214,39 +218,97 @@ Smart Tree is built around several key principles:
214218 - Metadata caching
215219 - Memory usage optimization
216220
217- ### Development
221+ ### Development Setup
218222
219- [ TODO: Add sections about:
223+ To set up the project for development:
224+
225+ ``` bash
226+ # Clone the repository
227+ git clone https://github.com/erik-balfe/smart-tree.git
228+ cd smart-tree
220229
221- - Project structure
222- - Development setup
223- - Testing approach
224- - Common patterns used in codebase]
230+ # Build the project
231+ cargo build
232+
233+ # Run tests
234+ cargo test
235+
236+ # Run the binary
237+ cargo run -- [path] [options]
238+ ```
239+
240+ #### Testing Approach
241+
242+ The project uses Rust's built-in testing framework with:
243+
244+ - Unit tests alongside implementation code
245+ - Integration tests for end-to-end functionality
246+ - Pretty assertions for more readable test output
225247
226248### Future Improvements
227249
228- [ TODO: List planned features :
250+ Planned enhancements for future versions :
229251
230- - Additional sorting strategies
231- - More metadata types]
252+ - ** Terminal Width Consideration** : Adaptive formatting based on available terminal width
253+ - ** Color Support** : Syntax highlighting for different file types and attributes
254+ - ** Parallel Scanning** : Multi-threaded directory traversal for large repositories
255+ - ** Metadata Caching** : Store and reuse file metadata for frequently accessed directories
256+ - ** Custom Folding Rules** : User-configurable rules for auto-folding directories
257+ - ** Interactive Mode** : Navigate the tree interactively with keyboard controls
232258
233- ## Technical Details
259+ ## Installation
234260
235- The project is organized into several key modules, each with specific responsibilities:
261+ ``` bash
262+ # Install from source
263+ git clone https://github.com/erik-balfe/smart-tree.git
264+ cd smart-tree
265+ cargo install --path .
236266
237- ### Project Structure
267+ # Now you can run from anywhere
268+ smart-tree [path] [options]
269+ ```
238270
239- ``` sh
271+ ## Usage
272+
273+ ``` bash
274+ # Basic usage - current directory
275+ smart-tree
276+
277+ # Specify directory
278+ smart-tree /path/to/directory
279+
280+ # Control output size
281+ smart-tree --max-lines 50
282+
283+ # Sort by modification time
284+ smart-tree --sort-by modified
285+
286+ # Sort by size
287+ smart-tree --sort-by size
288+
289+ # Limit directory depth
290+ smart-tree -L 3
291+
292+ # Show help with all options
293+ smart-tree --help
294+ ```
295+
296+ ## Project Structure
297+
298+ ```
240299src/
241- ├── display/ # Output formatting and display logic
242- │ ├── mod.rs # Module interface
243- │ ├── format.rs # Tree formatting implementation
244- │ ├── state.rs # Display state management
245- │ └── utils.rs # Formatting utilities
246- ├── types.rs # Core data structures
247- ├── scanner.rs # Directory traversal
248- ├── gitignore.rs # Ignore patterns handling
249- └── main.rs # CLI interface
300+ ├── display/ # Output formatting and display logic
301+ │ ├── mod.rs # Module interface
302+ │ ├── format.rs # Tree formatting implementation
303+ │ ├── state.rs # Display state management
304+ │ ├── tests.rs # Display tests
305+ │ └── utils.rs # Formatting utilities
306+ ├── gitignore.rs # Gitignore pattern handling
307+ ├── lib.rs # Library interface
308+ ├── log_macros.rs # Logging utilities
309+ ├── main.rs # CLI interface
310+ ├── scanner.rs # Directory traversal
311+ └── types.rs # Core data structures
250312```
251313
252314### Core Components
309371 - Dynamic folding based on available space
310372 - Context preservation in sorted output
311373
312- [ TODO: Add sequence diagram showing display decision flow]
313374
314375### Current Implementation Approaches
315376
349410 - Full directory tree kept in memory
350411 - Could benefit from streaming approach for very large directories
351412
352- [ TODO: Add detailed code examples for key algorithms]
0 commit comments