Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before creating any release PR, verify ALL of the following are updated:

- [ ] `Cargo.toml` — version bump
- [ ] All target issues merged to `develop`
- [ ] `cargo test` — all 506+ tests pass
- [ ] `cargo test` — all 517+ tests pass
- [ ] `cargo clippy --all-targets -- -D warnings` — clean
- [ ] `cargo fmt --all -- --check` — clean
- [ ] `cargo build --release` — no errors
Expand Down
5 changes: 3 additions & 2 deletions AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ no managed API, no cloud service. Runs locally against diffs, scans, or branches
```bash
cargo build # Build (debug)
cargo build --release # Build (release)
cargo test # Run all 506 tests
cargo test # Run all 517 tests
cargo clippy --all-targets -- -D warnings # Lint (strict)
cargo fmt --all -- --check # Format check
```
Expand All @@ -34,6 +34,7 @@ src/
│ ├── review.rs # cora review (diff-based review)
│ ├── scan.rs # cora scan (full-file scan)
│ ├── debt.rs # cora debt (tech debt report)
│ ├── commit_cmd.rs # cora commit (review + commit message + commit)
│ ├── config_cmd.rs # cora config (show/set/validate)
│ ├── auth.rs # cora auth (API key management)
│ ├── hook_cmd.rs # cora hook (pre-commit hook install/uninstall)
Expand Down Expand Up @@ -101,7 +102,7 @@ src/
## Testing

```bash
cargo test # 506 tests total
cargo test # 517 tests total
# 484 unit tests
# 16 CLI integration tests
# 6 config tests
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- **`cora commit`** — review staged diff + generate commit message + commit (#262)
- HITL mode (default): interactive `[Y]es / [E]dit / [N]o` prompt
- YOLO mode (`--yolo`): auto-commit without prompts
- `--force`: commit even if quality gate fails
- `--no-review`: skip review, only generate commit message
- `--edit`: always open `$EDITOR`
- Conventional commit format (feat/fix/refactor/perf/docs/test/chore/style/build/ci)
- Auto-truncates subjects to 72 chars
- Quality gate integration (block on FAIL unless `--force`)
- Debt snapshot saved after commit
- `chat_completion_raw()` + `chat_completion_stream_raw()` in `engine/llm.rs`
- 22 unit tests

## [0.5.0] - 2026-06-10

### Added
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Pick a provider, enter your API key. Done. Provider env vars (`ZAI_API_KEY`, `OP
cora review # staged changes
cora review --base main # vs a branch
cora review --unpushed # unpushed commits
cora commit # review + generate commit msg + commit
cora commit --yolo # auto-commit, no prompts
```

### Project Config
Expand Down Expand Up @@ -131,6 +133,7 @@ Works on **all CI platforms** — [Gitea, GitLab, Bitbucket →](https://codecor

| Command | Description |
|---------|-------------|
| `cora commit` | Review + generate commit message + commit |
| `cora review` | Review code changes |
| `cora scan` | Scan files for issues |
| `cora init` | Create project config + hook |
Expand Down
13 changes: 13 additions & 0 deletions docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Complete command reference for the cora CLI.
| Command | Description |
|---------|-------------|
| `cora init` | Create `.cora.yaml` config file |
| `cora commit` | Review staged + generate commit message + commit (HITL prompt) |
| `cora commit --yolo` | Auto-commit without prompts (YOLO mode) |
| `cora commit --force` | Commit even if quality gate fails |
| `cora commit --no-review` | Skip review, only generate commit message |
| `cora commit --edit` | Always open `$EDITOR` to edit message |
| `cora review` | Review code changes (default: staged files) |
| `cora review --staged` | Review staged git changes explicitly |
| `cora review --memory` | Recall project patterns from Uteke before review |
Expand Down Expand Up @@ -83,3 +88,11 @@ $ cora scan --incremental
# Install pre-commit hook
$ cora hook install
```

```bash
# Review + auto-generate commit message + commit
$ cora commit

# YOLO mode — auto-commit, no prompts
$ cora commit --yolo
```
53 changes: 53 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,59 @@ $ cora review --staged --format json
}
```

## Commit Workflow

`cora commit` combines review, commit message generation, and commit into a single
command. It runs in two modes:

### HITL mode (default)

Reviews staged changes, generates a conventional commit message, then prompts:

```bash
$ git add -A
$ cora commit
🔍 Reviewing staged changes (3 files, 247 lines)...
✅ No issues found (quality score: 9.2/10)

📝 Generated commit message:
feat(auth): add session expiry validation

Accept commit message? [Y]es / [E]dit / [N]o › y
✅ Committed: feat(auth): add session expiry validation
```

- `Y` (or Enter) — accept the message and commit
- `E` — open `$EDITOR` to edit, then commit
- `N` — abort

### YOLO mode (`--yolo`)

Auto-commits with no prompts. Use for trusted workflows (e.g. CI, rapid iteration):

```bash
$ cora commit --yolo
```

### Flags

| Flag | Description |
|------|-------------|
| `--yolo` | Auto-commit without prompts |
| `--force` | Commit even if quality gate fails |
| `--no-review` | Skip review, only generate commit message |
| `--edit` | Always open `$EDITOR` |
| `--stream` | Stream LLM response in real-time |
| `-q, --quiet` | Suppress all output except the result |

### Quality gate integration

If the quality gate is enabled and returns `FAIL`, `cora commit` blocks the
commit unless `--force` is passed:
```bash
$ cora commit --force
```

## Configuration File

The `.cora.yaml` file provides persistent configuration. Place it in your project root.
Expand Down
Loading
Loading