Skip to content

Commit 703dd20

Browse files
committed
docs: update docs for FR-031, FR-033, and test count to 308
Add --clipboard and --exclude to CLI reference in CLAUDE.md, README.md, and DOCS.md. Add exclude_patterns to config examples. Mark FR-031 and FR-033 as shipped in PRD, update Phase 4 status to shipped, and sync test count from 295 to 308 across all docs.
1 parent 58d7866 commit 703dd20

4 files changed

Lines changed: 38 additions & 22 deletions

File tree

CLAUDE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ commitbee --verbose # Show symbol extraction details
4646
commitbee --show-prompt # Debug: show the LLM prompt
4747
commitbee --no-split # Disable commit split suggestions
4848
commitbee --no-scope # Disable scope in commit messages
49+
commitbee --clipboard # Copy message to clipboard (no commit)
50+
commitbee --exclude "*.lock" # Exclude files matching glob pattern
4951
commitbee --locale de # Generate message in German (type/scope stay English)
5052
commitbee init # Create config file
5153
commitbee config # Show current configuration
@@ -75,6 +77,7 @@ rename_threshold = 70
7577
learn_from_history = false
7678
history_sample_size = 50
7779
# locale = "de"
80+
# exclude_patterns = ["*.lock", "**/*.generated.*"]
7881
# system_prompt_path = "/path/to/system.txt"
7982
# template_path = "/path/to/template.txt"
8083

@@ -184,7 +187,7 @@ src/
184187
### Running Tests
185188

186189
```bash
187-
cargo test # All tests (295 tests)
190+
cargo test # All tests (308 tests)
188191
cargo test --test sanitizer # CommitSanitizer tests
189192
cargo test --test safety # Safety module tests
190193
cargo test --test context # ContextBuilder tests
@@ -297,4 +300,4 @@ Common mistake: calling a new safeguard/check `fix` — if there was no bug, it'
297300

298301
### Documentation Sync
299302

300-
Keep README.md test count in sync (currently 295).
303+
Keep README.md test count in sync (currently 308).

DOCS.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ rename_threshold = 70
179179
# Disable built-in secret patterns by name (case-insensitive).
180180
# disabled_secret_patterns = ["Generic Secret (unquoted)"]
181181

182+
# Exclude files matching glob patterns from analysis and diff context.
183+
# Excluded files are listed in output but not sent to the LLM.
184+
# exclude_patterns = ["*.lock", "**/*.generated.*"]
185+
182186
# Commit message format options
183187
[format]
184188
# Include body/description in commit message
@@ -234,6 +238,8 @@ When run without a command, CommitBee generates a commit message for your staged
234238
| `--generate N` | `-n N` | Generate N candidates (1-5), pick interactively |
235239
| `--no-split` | | Disable commit split suggestions |
236240
| `--no-scope` | | Disable scope in commit messages |
241+
| `--clipboard` | | Copy message to clipboard instead of committing |
242+
| `--exclude <GLOB>` | | Exclude files matching glob pattern (repeatable) |
237243
| `--allow-secrets` | | Allow committing with detected secrets (Ollama only) |
238244
| `--show-prompt` | | Display the full prompt sent to the LLM |
239245
| `--verbose` | `-v` | Show symbol extraction details |
@@ -268,6 +274,13 @@ COMMITBEE_LOG=debug commitbee # Full debug logging
268274
# Multiple candidates
269275
commitbee -n 3 # Generate 3 options, pick the best
270276

277+
# Clipboard
278+
commitbee --clipboard # Copy message to clipboard (no commit)
279+
280+
# Exclude files
281+
commitbee --exclude "*.lock" # Skip lock files from analysis
282+
commitbee --exclude "*.lock" --exclude "vendor/**" # Multiple patterns
283+
271284
# Scripting / CI
272285
commitbee --yes --dry-run # Generate message, print to stdout, exit
273286
commitbee --no-split --yes # Skip split suggestion, auto-commit
@@ -679,7 +692,7 @@ No panics in user-facing code paths. The sanitizer and validator are tested with
679692

680693
### Testing Strategy
681694

682-
CommitBee has 295 tests across multiple strategies:
695+
CommitBee has 308 tests across multiple strategies:
683696

684697
| Strategy | What It Covers |
685698
| --- | --- |
@@ -692,7 +705,7 @@ CommitBee has 295 tests across multiple strategies:
692705
Run them:
693706

694707
```bash
695-
cargo test # All 295 tests
708+
cargo test # All 308 tests
696709
cargo test --test sanitizer # Just sanitizer tests
697710
cargo test --test integration # LLM provider mocks
698711
COMMITBEE_LOG=debug cargo test -- --nocapture # With logging

PRD.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
66

77
# CommitBee — Product Requirements Document
88

9-
**Version**: 4.0
10-
**Date**: 2026-03-13
11-
**Status**: Active
12-
**Author**: Sephyi + Claude
9+
**Version**: 4.0
10+
**Date**: 2026-03-13
11+
**Status**: Active
12+
**Author**: [Sephyi](https://github.com/Sephyi) + [Claude Opus 4.6](https://www.anthropic.com/news/claude-opus-4-6)
1313

1414
## Changelog
1515

@@ -18,8 +18,8 @@ SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
1818

1919
| Version | Date | Summary |
2020
|---------|------------|---------|
21-
| 4.0 | 2026-03-13 | PRD normalization: aligned phases with shipped versions (v0.2.0/v0.3.x/v0.4.0), collapsed revision history, unified status markers, resolved stale critical issues, canonicalized test count to 295, removed dead cross-references. |
22-
| 3.3 | 2026-03-13 | v0.4.0 full feature completion — FR-030 (Custom Prompt Templates), FR-032 (Multi-Language), FR-036 (Tree-sitter Query Patterns), FR-057 (Additional Languages), FR-058 (History Learning), TR-006 (Eval Harness), TR-007 (Fuzzing). 295 tests. |
21+
| 4.0 | 2026-03-13 | PRD normalization: aligned phases with shipped versions (v0.2.0/v0.3.x/v0.4.0), collapsed revision history, unified status markers, resolved stale critical issues, canonicalized test count to 308, removed dead cross-references. |
22+
| 3.3 | 2026-03-13 | v0.4.0 full feature completion — FR-030 (Custom Prompt Templates), FR-032 (Multi-Language), FR-036 (Tree-sitter Query Patterns), FR-057 (Additional Languages), FR-058 (History Learning), TR-006 (Eval Harness), TR-007 (Fuzzing). 308 tests. |
2323
| 3.2 | 2026-03-13 | FR-035 (Rename Detection), FR-037 (Expanded Secret Scanning), FR-038 (Progress Indicators). 202 tests. |
2424
| 3.1 | 2026-03-13 | Deep codebase audit + streaming hardening: `Provider::new()` returns `Result`, 1 MB response cap, EOF buffer parsing, zero-allocation streaming, HTTP error body propagation. 188 tests. |
2525
| 3.0 | 2026-03-08 | v0.3.1 multi-pass retry + prompt enforcement. FR-041 expanded to 7 rules. 182 tests. |
@@ -90,7 +90,7 @@ CommitBee is a Rust-native CLI tool that uses tree-sitter semantic analysis and
9090
| Multiple message generation (pick from N) | Common (aicommits, aicommit2) | ✅ v0.2.0 |
9191
| Commit splitting (multi-concern detection) | No competitor has this | ✅ v0.2.0 |
9292
| Custom prompt/instruction files | Growing (Copilot, aicommit2) | ✅ v0.4.0 |
93-
| Unit/integration tests | Non-negotiable for quality |295 tests |
93+
| Unit/integration tests | Non-negotiable for quality |308 tests |
9494

9595
## 3. Architecture
9696

@@ -443,15 +443,13 @@ Config: `learn_from_history` (default `false`), `history_sample_size` (default 5
443443

444444
3 `cargo-fuzz` targets: `fuzz_sanitizer`, `fuzz_safety`, `fuzz_diff_parser`. `fuzz/Cargo.toml` with `libfuzzer-sys`.
445445

446-
### 4.4 Unshipped — Remaining v0.4.x Scope
446+
#### FR-031: Exclude Files ✅
447447

448-
#### FR-031: Exclude Files
448+
`--exclude` CLI flag (repeatable) and `exclude_patterns` config option. Glob patterns via `globset` (e.g., `*.lock`, `**/*.generated.*`, `vendor/**`). Excluded files listed in output but not analyzed or included in diff context. CLI patterns additive with config patterns. Returns `NoStagedChanges` if all files excluded. 4 glob matching tests + 3 TOML tests + 3 CLI parsing tests.
449449

450-
`--exclude` CLI flag and `exclude_patterns` config option. Glob patterns (e.g., `*.lock`, `**/*.generated.*`). Excluded files listed but not analyzed or included in diff context.
450+
#### FR-033: Copy to Clipboard ✅
451451

452-
#### FR-033: Copy to Clipboard
453-
454-
`--clipboard` flag copies generated message to clipboard instead of committing. Uses system clipboard (pbcopy/xclip/xsel/clip). Works with `--dry-run`.
452+
`--clipboard` flag copies generated message to system clipboard and prints to stdout. Skips commit confirmation prompt. Uses platform-specific commands: `pbcopy` (macOS), `clip` (Windows), `xclip -selection clipboard` (Linux). Descriptive error if clipboard command unavailable. 3 CLI parsing tests.
455453

456454
### 4.5 Future — v0.5.0+ (Market Leadership)
457455

@@ -635,7 +633,7 @@ commitbee eval # Run evaluation harness (dev, feature-ga
635633

636634
## 8. Testing Requirements
637635

638-
**Current test count: 295**
636+
**Current test count: 308**
639637

640638
### TR-001: Unit Tests
641639

@@ -792,7 +790,7 @@ Invalid JSON → retry once with repair prompt. Second failure → heuristic ext
792790
| 1 | v0.2.0 | ✅ Shipped | Stability, correctness, providers, developer experience |
793791
| 2 | v0.3.x | ✅ Shipped | Differentiation — heuristics, validation, spec compliance |
794792
| 3 | v0.4.0 | ✅ Shipped | Feature completion — templates, languages, rename, history, eval, fuzzing |
795-
| 4 | v0.4.x | 🔧 In progress | Remaining polish — exclude files (FR-031), clipboard (FR-033) |
793+
| 4 | v0.4.x | ✅ Shipped | Remaining polish — exclude files (FR-031), clipboard (FR-033) |
796794
| 5 | v0.5.0+ | 📋 Planned | Market leadership — MCP server, changelog, monorepo, version bumping, GitHub Action |
797795

798796
## 12. Success Metrics
@@ -807,7 +805,7 @@ Invalid JSON → retry once with repair prompt. Second failure → heuristic ext
807805
| Commit message quality | > 80% "good enough" first try | Manual evaluation + `commitbee eval` |
808806
| Secret leak rate | 0 | Integration tests with known patterns |
809807
| MSRV | Rust 1.94 (edition 2024) | CI matrix (stable + 1.94) |
810-
| Test count |295 | `cargo test` (current: 295) |
808+
| Test count |308 | `cargo test` (current: 308) |
811809

812810
## 13. Non-Goals
813811

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ When your staged changes mix independent work (a bugfix in one module + a refact
9696
- **🐚 Shell completions** — bash, zsh, fish, powershell via `commitbee completions`.
9797
- **⚙️ 5-level config** — Defaults → project `.commitbee.toml` → user config → env vars → CLI flags.
9898
- **🦀 Single binary**~18K lines of Rust. Compiles to one static binary with LTO. No runtime dependencies.
99-
- **🧪 295 tests** — Unit, snapshot, property (proptest for never-panic guarantees), and integration (wiremock).
99+
- **🧪 308 tests** — Unit, snapshot, property (proptest for never-panic guarantees), and integration (wiremock).
100100

101101
## 📦 Installation
102102

@@ -175,6 +175,8 @@ commitbee [OPTIONS] [COMMAND]
175175
| `-n, --generate` | Generate N candidates (1-5, default 1) |
176176
| `--no-split` | Disable commit split suggestions |
177177
| `--no-scope` | Disable scope in commit messages |
178+
| `--clipboard` | Copy message to clipboard instead of committing |
179+
| `--exclude <GLOB>` | Exclude files matching glob pattern (repeatable) |
178180
| `--allow-secrets` | Allow committing with detected secrets |
179181
| `--verbose` | Show symbol extraction details |
180182
| `--show-prompt` | Debug: display the full LLM prompt |
@@ -217,7 +219,7 @@ The default provider (Ollama) runs entirely on your machine. No data leaves your
217219
## 🧪 Testing
218220

219221
```bash
220-
cargo test # 295 tests — unit, snapshot (insta), property (proptest), integration (wiremock)
222+
cargo test # 308 tests — unit, snapshot (insta), property (proptest), integration (wiremock)
221223
```
222224

223225
See [Testing Strategy](DOCS.md#testing-strategy) for the full breakdown.

0 commit comments

Comments
 (0)