Skip to content

Commit e85420c

Browse files
committed
docs: update PRD with structural cleanup and feature reorganization
Refactored feature requirements to correct FR placement, improve clarity, and align with Conventional Commits 1.0.0 spec. Updated FR definitions and roadmaps to reflect accurate shipping timelines and implementation status.
1 parent 341a9c1 commit e85420c

1 file changed

Lines changed: 26 additions & 23 deletions

File tree

PRD.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
1111
**Status**: Active
1212
**Author**: Sephyi + Claude
1313

14-
**Revision 2.3**: Version alignment (2026-02-22) — v0.2.0 shipped containing all Phase 1 (stability) and Phase 2 (polish/providers) features. Roadmap renumbered: Phase 3 (differentiation) is now v0.3.0, Phase 4 (market leadership) is now v0.4.0+.
14+
**Revision 2.5**: PRD structural cleanup (2026-02-22) — Fixed FR placement inconsistencies: FR-039 definition moved from Section 4.3 to Section 4.2 (shipped in v0.2.0); FR-040 placed only in Phase 2 roadmap (ships with v0.3.0, not v0.2.0); FR-024 (P1 number in P3 context) merged back into FR-058 to preserve decade numbering convention.
1515

1616
**Revision 2.4**: Post-v0.2.0 spec anchoring (2026-02-22) — Conventional Commits 1.0.0 spec compliance: `!` suffix on breaking changes, `BREAKING CHANGE:` footer (emitted regardless of `include_body`), commit type list synced with `CommitType::ALL` via compile-time test, symbol deduplication in context builder (prevents misleading LLM when function bodies change but definition lines don't move). Test count: 133.
1717

@@ -374,13 +374,16 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
374374
- **CLI**: `--no-split` disables the feature. `--yes` and non-TTY mode skip split suggestion (default to single commit).
375375
- **Acceptance**: Tested with 11 dedicated integration tests covering single module, multi-module, all-tests, all-docs, same-type collapse, test attachment, and sort order.
376376

377-
#### FR-024: Commit History Style Learning (Experimental, Future)
377+
#### FR-039: Config Validation ✅ (shipped in v0.2.0)
378378

379-
- **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.
380-
- **Status**: Planned (experimental — may diverge from strict Conventional Commits compliance)
381-
- **Priority**: P3 (future exploration)
382-
- **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.
383-
- **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.
379+
- **What**: Invalid config values only fail at runtime.
380+
- **Acceptance**:
381+
- `commitbee config check` validates configuration
382+
- `ollama_host` parsed as URL during config load
383+
- `max_diff_lines` bounded (10-10000)
384+
- Provider enum validated at config time, not runtime
385+
- Ollama health check (`/api/tags`) available as `commitbee doctor`
386+
- Config file permission warning if world-readable and contains keys
384387

385388
### 4.3 P2 — Next (v0.3.0: Differentiation)
386389

@@ -447,18 +450,16 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
447450
- **What**: No visual feedback during tree-sitter analysis or LLM model loading.
448451
- **Acceptance**: Spinner during "Analyzing code..." and "Generating message..." phases using `indicatif`. Suppressed in non-TTY mode. Respects `NO_COLOR`.
449452

450-
#### FR-039: Config Validation
453+
#### FR-040: Conventional Commits 1.0.0 Spec Anchoring ✅ (implemented post-v0.2.0)
451454

452-
- **What**: Invalid config values only fail at runtime.
455+
- **What**: Full compliance with the Conventional Commits 1.0.0 specification for breaking changes and type list integrity.
453456
- **Acceptance**:
454-
- `commitbee config check` validates configuration
455-
- `ollama_host` parsed as URL during config load
456-
- `max_diff_lines` bounded (10-10000)
457-
- Provider enum validated at config time, not runtime
458-
- Ollama health check (`/api/tags`) available as `commitbee doctor`
459-
- Config file permission warning if world-readable and contains keys
460-
461-
**Note**: FR-039 should be prioritized early in v0.3.0 development, as config validation underpins reliable behavior for all other P1 features.
457+
- Breaking changes emit `!` suffix on the commit first line (e.g., `feat!: remove v1 API`)
458+
- `BREAKING CHANGE:` footer always emitted for breaking changes regardless of `include_body` config (it is machine-readable metadata, not prose)
459+
- Footer wrapped at 72 chars with continuation lines indented two spaces (git-trailer compatible)
460+
- Single shared `SYSTEM_PROMPT` constant in `llm/mod.rs` used by all providers; commit type list kept in sync with `CommitType::ALL` via compile-time test
461+
- Sanitizer normalizes string literal `"null"` → non-breaking (defensive handling for model template quirk)
462+
- Symbol deduplication in context builder: functions modified in-place no longer appear as both Added and Removed, preventing misleading LLM context
462463

463464
### 4.4 P3 — Future (v0.4.0+: Market Leadership)
464465

@@ -510,10 +511,12 @@ These are bugs, panics, and missing foundations that must be fixed before any ne
510511
all-languages = ["lang-java", "lang-cpp", "lang-ruby", "lang-csharp", ...]
511512
```
512513

513-
#### FR-058: Learning from Commit History
514+
#### FR-058: Commit History Style Learning (Experimental)
514515

515-
- **What**: Analyze existing commit history to match the project's commit style.
516-
- **Rationale**: GitHub Copilot does this. Would allow commitbee to adapt to any project's conventions.
516+
- **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.
517+
- **Status**: Planned (experimental — may diverge from strict Conventional Commits compliance)
518+
- **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.
519+
- **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.
517520

518521
## 5. Security Requirements
519522

@@ -883,15 +886,15 @@ opt-level = "z" # or "s" — benchmark both
883886
- FR-020: Async git operations ✅
884887
- FR-021: Single-pass diff parsing ✅
885888
- FR-022: Integration test suite ✅ (133 tests)
886-
- Conventional Commits 1.0.0 spec anchoring: `!` suffix for breaking changes, `BREAKING CHANGE:` footer (emitted regardless of `include_body`), commit type list synced with `CommitType::ALL` via compile-time test ✅
887889
- FR-023: Commit splitting ✅
888-
- FR-039: Config validation & doctor command ✅
890+
- FR-039: Config validation & doctor command ✅ (shipped in v0.2.0)
889891
- TR-005: CI pipeline ✅
890892

891893
### Phase 2: Differentiation (v0.3.0)
892894

893895
**Goal**: Features that set commitbee apart from competitors.
894896

897+
- FR-040: Conventional Commits 1.0.0 spec anchoring ✅ (already implemented)
895898
- FR-030: Custom prompt templates
896899
- FR-031: Exclude files
897900
- FR-032: Multi-language commit messages
@@ -916,7 +919,7 @@ opt-level = "z" # or "s" — benchmark both
916919
- FR-055: Version bumping
917920
- FR-056: GitHub Action
918921
- FR-057: Additional language support (feature-gated)
919-
- FR-058: Learning from commit history (see also FR-024 for experimental approach)
922+
- FR-058: Commit history style learning (experimental)
920923

921924
## 12. Success Metrics
922925

0 commit comments

Comments
 (0)