Skip to content

Commit dabcca2

Browse files
committed
Update README.md and CLAUDE.md
1 parent e842c7c commit dabcca2

2 files changed

Lines changed: 29 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,29 @@ Code LoD is a CLI tool that generates and manages code descriptions at different
5252

5353
```
5454
src/code_lod/
55-
├── cli.py # Main Typer CLI commands
56-
├── config.py # Config/Paths management
55+
├── cli/ # Typer CLI commands (one file per command)
56+
│ ├── __init__.py # Main app entry point
57+
│ ├── clean.py # Clean all code-lod data
58+
│ ├── config.py # Configuration management
59+
│ ├── generate.py # Generate descriptions
60+
│ ├── hooks.py # Git hooks installation
61+
│ ├── init.py # Initialize code-lod
62+
│ ├── read.py # Output descriptions
63+
│ ├── status.py # Check freshness status
64+
│ ├── update.py # Update stale descriptions
65+
│ └── validate.py # Validate descriptions
66+
├── config.py # Paths management
5767
├── db.py # SQLite hash index
5868
├── hashing.py # AST hash computation
5969
├── models.py # Pydantic data models
6070
├── staleness.py # StalenessTracker
61-
├── llm/ # LLM generator abstraction
71+
├── llm/
72+
│ ├── __init__.py
73+
│ └── description_generator/ # LLM generator abstraction
74+
│ ├── generator.py # BaseGenerator interface
75+
│ ├── anthropic.py # Anthropic Claude provider
76+
│ ├── openai.py # OpenAI provider
77+
│ └── mock.py # Mock generator for testing
6278
├── parsers/ # BaseParser, tree-sitter implementations
6379
└── lod_file/ # .lod file read/write/comment parsing
6480
```

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ Reading a project's README and source code works for small projects, but becomes
7575

7676
## Architecture
7777

78+
Code LoD generates, manages, and updates code descriptions through a multi-layered pipeline:
79+
80+
1. **Parsing** (`parsers/`): Tree-sitter based parsers extract code entities (functions, classes, modules) with AST hashes
81+
2. **Hashing** (`hashing.py`): AST hashes are computed on normalized source to detect semantic changes
82+
3. **Staleness Tracking** (`staleness.py`): Uses the hash index to determine if descriptions need regeneration
83+
4. **Generation** (`llm/description_generator/`): Abstract `BaseGenerator` interface for LLM providers (Anthropic, OpenAI, Mock)
84+
5. **Storage** (`db.py`, `lod_file/`): Dual storage system with SQLite database and `.lod` files
85+
86+
### Storage
87+
7888
Code LoD uses a dual storage system:
7989

8090
1. **SQLite database** (`hash_index.db`) - Stores metadata, hashes, and descriptions with staleness tracking (should not be version controlled)

0 commit comments

Comments
 (0)