Skip to content

Commit 15f0b74

Browse files
committed
docs: update README and CLAUDE.md for v0.3.0 features
Reflects completed v0.3.0 work: cloud providers, git hooks, multiple message generation, doctor command, shell completions, miette errors, figment config, and 101 tests.
1 parent eb47c2d commit 15f0b74

2 files changed

Lines changed: 59 additions & 32 deletions

File tree

CLAUDE.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ cargo build --release
3535
## Commands
3636

3737
```bash
38-
commitbee # Generate commit message (interactive)
39-
commitbee --dry-run # Print message only, don't commit
40-
commitbee --yes # Auto-confirm and commit
41-
commitbee --verbose # Show symbol extraction details
42-
commitbee --show-prompt # Debug: show the LLM prompt
43-
commitbee init # Create config file
44-
commitbee config # Show current configuration
38+
commitbee # Generate commit message (interactive)
39+
commitbee --dry-run # Print message only, don't commit
40+
commitbee --yes # Auto-confirm and commit
41+
commitbee -n 3 # Generate 3 candidates, pick interactively
42+
commitbee --verbose # Show symbol extraction details
43+
commitbee --show-prompt # Debug: show the LLM prompt
44+
commitbee init # Create config file
45+
commitbee config # Show current configuration
46+
commitbee doctor # Check configuration and connectivity
47+
commitbee completions bash # Generate shell completions
48+
commitbee hook install # Install prepare-commit-msg hook
49+
commitbee hook uninstall # Remove prepare-commit-msg hook
50+
commitbee hook status # Check if hook is installed
4551
```
4652

4753
## Config
@@ -76,8 +82,8 @@ src/
7682
├── lib.rs # Library exports
7783
├── app.rs # Application orchestrator
7884
├── cli.rs # CLI arguments (clap)
79-
├── config.rs # Configuration (XDG + ENV)
80-
├── error.rs # Error types (thiserror)
85+
├── config.rs # Configuration (figment layered)
86+
├── error.rs # Error types (thiserror + miette)
8187
├── domain/
8288
│ ├── mod.rs
8389
│ ├── change.rs # FileChange, StagedChanges, ChangeStatus
@@ -92,13 +98,16 @@ src/
9298
├── safety.rs # Secret scanning, conflict detection
9399
├── sanitizer.rs # CommitSanitizer (JSON + plain text)
94100
└── llm/
95-
├── mod.rs # LlmProvider trait
96-
└── ollama.rs # OllamaProvider (streaming)
101+
├── mod.rs # LlmProvider trait + enum dispatch
102+
├── ollama.rs # OllamaProvider (streaming NDJSON)
103+
├── openai.rs # OpenAiProvider (SSE streaming)
104+
└── anthropic.rs # AnthropicProvider (SSE streaming)
97105
```
98106

99107
## References
100108

101109
- **PRD & Roadmap**: `PRD.md`
110+
- **v0.3.0 enhancement plan**: `.claude/plans/PLAN_V030_ENHANCEMENTS.md`
102111
- **Implementation plan (v1, outdated)**: `.claude/plans/PLAN_COMMITBEE_V1.md` — superseded by PRD v2.1
103112

104113
## Development Notes
@@ -119,11 +128,12 @@ src/
119128
### Running Tests
120129

121130
```bash
122-
cargo test # All tests (55 tests)
123-
cargo test --test sanitizer # Specific integration test file
131+
cargo test # All tests (101 tests)
132+
cargo test --test sanitizer # CommitSanitizer tests
124133
cargo test --test safety # Safety module tests
125134
cargo test --test context # ContextBuilder tests
126135
cargo test --test commit_type # CommitType tests
136+
cargo test --test integration # LLM provider integration tests (wiremock)
127137
cargo test -- --nocapture # Show println output
128138
```
129139

@@ -173,6 +183,10 @@ git add some-file.rs
173183
- `CommitSanitizer::clean_text` has a known bug with overlapping preamble patterns (indexes modified string with original offsets) — documented, not yet fixed
174184
- Parallel subagents running `cargo fmt` may create unstaged changes — commit formatting separately
175185
- Secret pattern `sk-[a-zA-Z0-9]{48}` requires exactly 48 chars after `sk-` in test data
186+
- `AnthropicProvider` has hardcoded `BASE_URL` — cannot redirect to wiremock; test via sanitizer pipeline instead
187+
- `tokio::process::Command` output needs explicit `std::process::Output` type annotation when using `.ok()?`
188+
- Tree-sitter is CPU-bound/sync — pre-fetch file content into HashMaps async, then pass as sync closures
189+
- `#[cfg(feature = "secure-storage")]` gates both the error variant and CLI commands for keyring
176190

177191
### Markdown Conventions
178192

README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,21 @@ commitbee [OPTIONS] [COMMAND]
121121
| ----------------- | -------------------------------------- |
122122
| `--dry-run` | Print message only, don't commit |
123123
| `--yes` | Auto-confirm and commit |
124+
| `-n, --generate` | Generate N candidates (1-5, default 1) |
124125
| `--verbose` | Show symbol extraction details |
125126
| `--show-prompt` | Debug: display the full LLM prompt |
126127

127128
### Commands
128129

129-
| Command | Description |
130-
| ----------------- | -------------------------------------- |
131-
| `init` | Create a config file |
132-
| `config` | Show current configuration |
130+
| Command | Description |
131+
| --------------------- | -------------------------------------- |
132+
| `init` | Create a config file |
133+
| `config` | Show current configuration |
134+
| `doctor` | Check configuration and connectivity |
135+
| `completions <shell>` | Generate shell completions |
136+
| `hook install` | Install prepare-commit-msg hook |
137+
| `hook uninstall` | Remove prepare-commit-msg hook |
138+
| `hook status` | Check if hook is installed |
133139

134140
## 🌳 How It Works
135141

@@ -184,8 +190,8 @@ src/
184190
├── lib.rs # Library exports
185191
├── app.rs # Application orchestrator
186192
├── cli.rs # CLI arguments (clap)
187-
├── config.rs # Configuration (XDG + ENV)
188-
├── error.rs # Error types (thiserror)
193+
├── config.rs # Configuration (figment layered)
194+
├── error.rs # Error types (thiserror + miette)
189195
├── domain/
190196
│ ├── change.rs # FileChange, StagedChanges, ChangeStatus
191197
│ ├── symbol.rs # CodeSymbol, SymbolKind
@@ -198,38 +204,45 @@ src/
198204
├── safety.rs # Secret scanning, conflict detection
199205
├── sanitizer.rs # CommitSanitizer (JSON + plain text)
200206
└── llm/
201-
├── mod.rs # LlmProvider trait
202-
└── ollama.rs # OllamaProvider (streaming)
207+
├── mod.rs # LlmProvider trait + enum dispatch
208+
├── ollama.rs # OllamaProvider (streaming NDJSON)
209+
├── openai.rs # OpenAiProvider (SSE streaming)
210+
└── anthropic.rs # AnthropicProvider (SSE streaming)
203211
```
204212

205213
## 🧪 Testing
206214

207215
```bash
208-
cargo test # All tests (55 tests)
216+
cargo test # All tests (101 tests)
209217
cargo test --test sanitizer # CommitSanitizer tests
210218
cargo test --test safety # Secret scanner tests
211219
cargo test --test context # ContextBuilder tests
212220
cargo test --test commit_type # CommitType tests
221+
cargo test --test integration # LLM provider integration tests
213222
```
214223

215-
The test suite includes snapshot tests ([insta](https://insta.rs/)), property-based tests ([proptest](https://proptest-rs.github.io/proptest/)), and never-panic guarantees for all user-facing parsers.
224+
The test suite includes snapshot tests ([insta](https://insta.rs/)), property-based tests ([proptest](https://proptest-rs.github.io/proptest/)), never-panic guarantees for all user-facing parsers, and integration tests using [wiremock](https://docs.rs/wiremock) for LLM provider mocking.
216225

217226
## 🗺️ Roadmap
218227

219228
| Phase | Version | Status |
220229
| --------------------------- | ---------- | ---------------- |
221-
| 🔧 Stability & Correctness | `v0.2.0` | 🚧 In Progress |
222-
| ✨ Polish & Providers | `v0.3.0` | 📋 Planned |
230+
| 🔧 Stability & Correctness | `v0.2.0` | ✅ Complete |
231+
| ✨ Polish & Providers | `v0.3.0` | 🚧 In Progress |
223232
| 🚀 Differentiation | `v0.4.0` | 📋 Planned |
224233
| 👑 Market Leadership | `v1.0+` | 🔮 Future |
225234

226-
### Coming next
227-
228-
- **Cloud providers** — OpenAI-compatible and Anthropic support
229-
- **Git hook integration**`commitbee hook install` for `prepare-commit-msg`
230-
- **Shell completions** — bash, zsh, fish, powershell
231-
- **Rich error diagnostics** — Actionable error messages with help suggestions
232-
- **Multiple message generation** — Generate N candidates, pick the best
235+
### v0.3.0 highlights (in progress)
236+
237+
- **Cloud providers** — OpenAI-compatible and Anthropic streaming support
238+
- **Git hook integration**`commitbee hook install/uninstall/status`
239+
- **Shell completions** — bash, zsh, fish, powershell via `clap_complete`
240+
- **Rich error diagnostics**`miette` for actionable error messages
241+
- **Multiple message generation**`--generate N` with interactive candidate selection
242+
- **Hierarchical config**`figment`-based layering (CLI > Env > File > Defaults)
243+
- **Structured logging**`tracing` with `COMMITBEE_LOG` env filter
244+
- **Doctor command**`commitbee doctor` for connectivity and config checks
245+
- **Secure key storage** — OS keychain via `keyring` (optional feature)
233246

234247
See [`PRD.md`](PRD.md) for the full product requirements document.
235248

0 commit comments

Comments
 (0)