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: update CLAUDE.md and PRD.md for v0.4.0 feature completion
Mark FR-030, FR-032, FR-036, FR-057, FR-058, TR-006, TR-007 as
implemented. Move FR-057/FR-058 from Phase 3 to Phase 2. Update
test count to 280, add new config options and file structure entries.
PRD bumped to v3.3.
commitbee --no-scope # Disable scope in commit messages
49
+
commitbee --locale de # Generate message in German (type/scope stay English)
49
50
commitbee init # Create config file
50
51
commitbee config # Show current configuration
51
52
commitbee doctor # Check configuration and connectivity
@@ -71,6 +72,11 @@ num_predict = 256
71
72
timeout_secs = 30
72
73
think = false
73
74
rename_threshold = 70
75
+
learn_from_history = false
76
+
history_sample_size = 50
77
+
# locale = "de"
78
+
# system_prompt_path = "/path/to/system.txt"
79
+
# template_path = "/path/to/template.txt"
74
80
75
81
[format]
76
82
include_body = true
@@ -91,7 +97,9 @@ lowercase_subject = true
91
97
92
98
## Supported Languages (tree-sitter)
93
99
94
-
Rust, TypeScript, JavaScript, Python, Go
100
+
Built-in: Rust, TypeScript, JavaScript, Python, Go
101
+
102
+
Feature-gated (optional): Java (`lang-java`), C (`lang-c`), C++ (`lang-cpp`), Ruby (`lang-ruby`), C# (`lang-csharp`). Enable with `--features lang-java` or `--features all-languages`.
- Default templates remain if no custom template specified
419
+
-**Implemented**: `TemplateService` in `src/services/template.rs` — loads custom system prompt and user prompt template files. Config fields `system_prompt_path` and `template_path`. All LLM providers pass through custom system prompt when configured. 7 template tests.
417
420
418
421
#### FR-031: Exclude Files
419
422
420
423
-**What**: Skip certain files from analysis.
421
424
-**Acceptance**: `--exclude` CLI flag and `exclude_patterns` config option. Glob patterns (e.g., `*.lock`, `**/*.generated.*`). Excluded files still listed but not analyzed or included in diff context.
-**What**: Generate commit messages in languages other than English.
429
+
-**Status**: **Implemented** (v0.4.0)
426
430
-**Acceptance**: `--locale <lang>` flag (e.g., `--locale de`, `--locale ja`). Prompt instructs LLM to write in target language. Type/scope remain in English (conventional commits spec).
431
+
-**Implemented**: `--locale` CLI flag and `locale` config option. `LANGUAGE:` instruction injected into prompt context. ISO 639-1 codes supported.
427
432
428
433
#### FR-033: Copy to Clipboard
429
434
@@ -454,10 +459,12 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
454
459
-**Acceptance**: Use `git diff --cached --find-renames`. Parse `R` status. Set `old_path` field. LLM prompt says "renamed X to Y" instead of "added Y, deleted X".
455
460
-**Implemented**: `--find-renames=N%` with configurable `rename_threshold` (default 70%, 0 disables). NUL-delimited `R<NNN>` status parsing consumes two path fields. `ChangeStatus::Renamed` variant (Copy-safe, old_path on `FileChange`). Context builder formats as `old → new (N% similar)`. Split suggestions show `[R]` marker. 202 tests.
-**What**: Replace manual AST walking with tree-sitter query S-expressions.
465
+
-**Status**: **Implemented** (v0.4.0)
460
466
-**Acceptance**: Each language has a `.scm` query file defining symbol extraction. More maintainable, more precise, easier to add new languages.
467
+
-**Implemented**: `src/queries/*.scm` files for each language with `@name` and `@definition` captures. `LanguageConfig` struct with `query_source` field. `tree_sitter::Query` + `QueryCursor` + `StreamingIterator` pattern matching replaces manual `TreeCursor` walking.
461
468
462
469
#### FR-037: Expanded Secret Scanning ✅ (v0.4.0)
463
470
@@ -546,25 +553,20 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
546
553
-**What**: Run commitbee in CI to validate or rewrite commit messages.
547
554
-**Rationale**: opencommit's GitHub Action is a key differentiator for team adoption.
-**What**: Expand tree-sitter beyond Rust/TS/JS/Python/Go to Java, C/C++, Ruby, C#.
559
+
-**Status**: **Implemented** (v0.4.0)
560
+
-**Acceptance**: Feature-gated language support to control binary size.
561
+
-**Implemented**: 5 new language crates (`tree-sitter-java`, `tree-sitter-c`, `tree-sitter-cpp`, `tree-sitter-ruby`, `tree-sitter-c-sharp`) as optional dependencies. Feature flags: `lang-java`, `lang-c`, `lang-cpp`, `lang-ruby`, `lang-csharp`, `all-languages`. Each language has `.scm` query files. 15 feature-gated tests in `tests/languages.rs`. Visibility detection for Java/C# public modifiers.
561
562
562
-
#### FR-058: Commit History Style Learning (Experimental)
563
+
#### FR-058: Commit History Style Learning (Experimental) ✅ (v0.4.0)
563
564
564
565
-**What**: Analyze existing commit history in the repository to learn the project's commit style, then align generated messages accordingly. This includes scope naming conventions, type usage patterns, subject phrasing style, and body conventions.
565
-
- **Status**: Planned (experimental — may diverge from strict Conventional Commits compliance)
-**Rationale**: GitHub Copilot does this implicitly. Making it explicit and configurable would be a differentiator. However, blindly mimicking a repository's history could produce non-compliant messages if the history is inconsistent.
567
568
-**Acceptance**: Feature-gated behind `--experimental-history` or a config flag. Samples last N commits, extracts patterns, injects as additional context in the LLM prompt. Does not override conventional commits structure — only influences scope naming and subject phrasing style.
569
+
-**Implemented**: `HistoryService` in `src/services/history.rs` — `analyze()` fetches last N commit subjects via `git log`, `analyze_subjects()` extracts type distribution, scope patterns, case style, conventional compliance ratio, and sample subjects. `HistoryContext::to_prompt_section()` formats as `PROJECT STYLE` block. Config: `learn_from_history` (bool, default false), `history_sample_size` (default 50). Deterministic sort order for equal-count entries.
568
570
569
571
## 5. Security Requirements
570
572
@@ -817,17 +819,20 @@ proptest! {
817
819
- Matrix: stable Rust + MSRV (1.94)
818
820
-**Edition 2024**: Rust edition 2024 requires MSRV 1.94; let chains (Rust 1.94) raise the effective MSRV to 1.94. CI matrix explicitly tests both stable and 1.94 to verify compatibility.
A developer-facing command (`commitbee eval`) that runs the full pipeline against a set of fixture diffs and compares generated commit messages against expected style snapshots. Not shipped in release builds (feature-gated behind `dev` or `eval` feature flag).
823
825
824
826
-**Fixtures**: Stored in `tests/fixtures/eval/`, each containing a staged diff, optional config overrides, and an expected output snapshot.
825
827
-**Output**: Pass/fail report per fixture, with diff of expected vs. actual message.
826
828
-**Purpose**: Regression testing for prompt engineering changes — ensures prompt template updates don't degrade quality across the fixture set.
829
+
-**Status**: **Implemented** (v0.4.0)
830
+
831
+
### TR-007: Fuzzing ✅ (v0.4.0)
827
832
828
-
### TR-007: Fuzzing (Future Enhancement)
833
+
`cargo fuzz` targets for the diff parser, sanitizer, and secret scanner. Fuzz targets in `fuzz/` directory following standard `cargo-fuzz` conventions.
829
834
830
-
`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.
0 commit comments