You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add project README and update development documentation
Add comprehensive README.md with installation, usage, architecture, and
contributing sections. Update CLAUDE.md with expanded test commands, CI
verification gate, gotchas, and dev dependency list. Clean up PRD.md
formatting. Add REUSE.toml annotation for test snapshot files.
- REUSE.toml `[[annotations]]` — only for files that can't have inline headers (e.g., Cargo.lock)
117
+
- REUSE.toml `[[annotations]]` — for files that can't have inline headers (Cargo.lock, tests/snapshots/**)
118
118
119
-
### Running Tests (when implemented)
119
+
### Running Tests
120
120
121
121
```bash
122
-
cargo test# All tests
123
-
cargo test sanitizer # Specific module
122
+
cargo test# All tests (55 tests)
123
+
cargo test --test sanitizer # Specific integration test file
124
+
cargo test --test safety # Safety module tests
125
+
cargo test --test context # ContextBuilder tests
126
+
cargo test --test commit_type # CommitType tests
124
127
cargo test -- --nocapture # Show println output
125
128
```
126
129
130
+
**Important:**`cargo test sanitizer` matches test *names* across all binaries. Use `cargo test --test <name>` to select a specific integration test file.
-`gix` API: use `repo.workdir()` not `repo.work_dir()` (deprecated)
171
+
-`CommitType::parse()` not `from_str()` — avoids clippy `should_implement_trait` warning
172
+
- Enum variants used only via `CommitType::ALL` const need `#[allow(dead_code)]`
173
+
-`CommitSanitizer::clean_text` has a known bug with overlapping preamble patterns (indexes modified string with original offsets) — documented, not yet fixed
**Revision 2.1**: Enhancement review integration (2026-02-17) — incorporated evaluation harness, symbol extraction fallback ladder, cancellation contract, streaming trait abstraction, golden test fixtures, output format contracts, hook edge cases, JSON retry logic, and 12 additional refinements from verification review.
15
15
16
-
---
17
-
18
16
## 1. Vision
19
17
20
18
> **"The commit message generator that actually understands your code."**
@@ -35,8 +33,6 @@ CommitBee is a Rust-native CLI tool that uses tree-sitter semantic analysis and
35
33
-**v0.2.0** is a stability release: config format preserved, no breaking CLI changes.
36
34
-**v0.3.0+** may introduce breaking changes (new config system via figment, CLI subcommand restructuring). Migration documentation will accompany any breaking release.
37
35
38
-
---
39
-
40
36
## 2. Competitive Landscape
41
37
42
38
### 2.1 Market Position
@@ -68,8 +64,6 @@ CommitBee is a Rust-native CLI tool that uses tree-sitter semantic analysis and
| Unit/integration tests | Non-negotiable for quality. | Zero tests |
70
66
71
-
---
72
-
73
67
## 3. Architecture Requirements
74
68
75
69
### 3.1 Current Architecture Assessment
@@ -203,8 +197,6 @@ pub struct App {
203
197
204
198
`generate_stream()` is required for all providers in P1 scope (FR-011, FR-012, FR-013). Providers that do not support streaming should implement `generate_stream()` by wrapping `generate()` as a single-element stream.
@@ -490,8 +482,6 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
490
482
- **What**: Analyze existing commit history to match the project's commit style.
491
483
- **Rationale**: GitHub Copilot does this. Would allow commitbee to adapt to any project's conventions.
492
484
493
-
---
494
-
495
485
## 5. Security Requirements
496
486
497
487
### SR-001: Secret Scanning (Enhanced)
@@ -529,8 +519,6 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
529
519
- `cargo deny` for license compliance
530
520
- Minimize dependency tree (remove unused crates)
531
521
532
-
---
533
-
534
522
## 6. Performance Requirements
535
523
536
524
### PR-001: Startup Time
@@ -582,8 +570,6 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
582
570
- Git commit is only called after the user confirms the complete message. No intermediate state is written to the repository.
583
571
- Temp files (if any) are cleaned up via RAII (`Drop` impl or `tempfile` crate auto-cleanup).
584
572
585
-
---
586
-
587
573
## 7. UX Requirements
588
574
589
575
### UX-001: Error Messages
@@ -665,8 +651,6 @@ Exact output behavior for key flags:
665
651
- **`--show-prompt`**: Prints the full LLM prompt to stderr (system prompt + user prompt). API keys and secret patterns are **redacted** (replaced with `[REDACTED]`). Does not call the LLM. Exit code 0.
666
652
- **Default (interactive)**: Displays the generated message and a confirm/edit/cancel prompt on stderr. On confirm, commits and prints the commit hash to stdout.
667
653
668
-
---
669
-
670
654
## 8. Testing Requirements
671
655
672
656
### TR-001: Unit Tests
@@ -759,8 +743,6 @@ A developer-facing command (`commitbee eval`) that runs the full pipeline agains
759
743
760
744
`cargo fuzz` targets for the diff parser, sanitizer, and secret scanner. Priority: P2 — implement after the unit test suite (TR-001) and property tests (TR-004) are stable. Fuzz targets should be added to `fuzz/` directory following standard `cargo-fuzz` conventions.
761
745
762
-
---
763
-
764
746
## 9. Distribution Requirements
765
747
766
748
### DR-001: cargo install
@@ -797,8 +779,6 @@ codegen-units = 1
797
779
opt-level = "z" # or "s" — benchmark both
798
780
```
799
781
800
-
---
801
-
802
782
## 10. Prompt Engineering Requirements
803
783
804
784
### PE-001: System Prompt
@@ -842,8 +822,6 @@ opt-level = "z" # or "s" — benchmark both
842
822
- If the retry also fails, fall back to heuristic extraction: infer commit type from the diff header and file categories, extract the first coherent sentence as the commit message description.
843
823
- Never retry more than once (avoid infinite loops with models that consistently produce invalid output).
844
824
845
-
---
846
-
847
825
## 11. Phased Roadmap
848
826
849
827
### Phase 1: Stability (v0.2.0)
@@ -908,8 +886,6 @@ opt-level = "z" # or "s" — benchmark both
908
886
- FR-057: Additional language support (feature-gated)
909
887
- FR-058: Learning from commit history
910
888
911
-
---
912
-
913
889
## 12. Success Metrics
914
890
915
891
| Metric | Target | How to Measure |
@@ -923,8 +899,6 @@ opt-level = "z" # or "s" — benchmark both
923
899
| Secret leak rate | 0 (no secrets sent to cloud LLMs) | Integration tests with known secret patterns |
- **GUI/TUI application** — CommitBee is CLI-first. Editor integration happens via MCP server mode, not a built-in UI.
@@ -934,8 +908,6 @@ opt-level = "z" # or "s" — benchmark both
934
908
- **Non-git VCS** — Jujutsu/Mercurial support is not a priority. Git covers > 95% of the market.
935
909
- **Shell snippet detection** — Commit messages are never executed by git; shell injection via commit message content is not a real attack vector. Standard sanitization (FR-001, FR-007) is sufficient.
0 commit comments