Skip to content

Commit 987ef22

Browse files
evansenterclaude
andcommitted
chore: add CHANGELOG.md and bump version to 0.4.0
- Create CHANGELOG.md documenting releases from 0.1.0 to 0.4.0 - Bump version from 0.2.0 to 0.4.0 - Add changelog requirement note to CLAUDE.md - Update CLAUDE.md with missing AgentEvent::Retry variant - Update CLAUDE.md with clemitui test structure - Fix docs/TOOLS.md system prompt path reference Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 869a074 commit 987ef22

4 files changed

Lines changed: 82 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.4.0] - 2026-01-24
9+
10+
### Added
11+
- **Reedline REPL**: Line editing, persistent history (10,000 entries), Ctrl-R search
12+
- **clemitui crate**: Standalone TUI library for ACP-compatible agents
13+
- **Event bus**: Cross-session coordination via SQLite-backed pub/sub
14+
- **Plan mode**: Structured planning with tool restrictions and user approval
15+
- **ACP server**: Agent Client Protocol implementation for subagent spawning
16+
- **TaskOutput tool**: Retrieve results from background tasks
17+
- **Comprehensive test suite**: PTY-based terminal tests, plan mode tests, ACP simulation tests
18+
19+
### Changed
20+
- Improved Ctrl-C handling via `tokio::select!` with biased polling
21+
- Extracted formatting functions to clemitui for reuse by other agents
22+
- Consolidated tool formatting into pure functions
23+
24+
### Fixed
25+
- Made `test_command_safety_classification` more deterministic
26+
- Fixed newlines in tool output formatting
27+
28+
## [0.3.0] - 2026-01-15
29+
30+
### Added
31+
- **Task tool**: Spawn subagents for complex operations
32+
- **Diff highlighting**: Syntax highlighting with Catppuccin Mocha theme
33+
- **Auto-retry**: Automatic retry on transient API failures
34+
35+
### Changed
36+
- Simplified streaming architecture to full buffering
37+
- Consolidated event handling
38+
39+
### Fixed
40+
- Prevent self-confirmation of dangerous commands
41+
- Normalize spacing before tools and OUT lines
42+
43+
## [0.2.0] - 2026-01-10
44+
45+
### Added
46+
- MCP server mode (`--mcp-server`)
47+
- Tool confirmation flow for destructive commands
48+
- Background task execution
49+
50+
### Changed
51+
- Refactored to event-driven architecture
52+
- Improved tool output formatting
53+
54+
## [0.1.0] - 2026-01-01
55+
56+
### Added
57+
- Initial release
58+
- Interactive REPL with streaming output
59+
- Single prompt mode (`-p "prompt"`)
60+
- Built-in tools: bash, read, write, edit, glob, grep
61+
- Tool sandboxing with path validation

CLAUDE.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,21 @@ Standalone crate for terminal UI, usable by any ACP-compatible agent:
7676
```
7777
crates/clemitui/
7878
├── Cargo.toml
79-
└── src/
80-
├── lib.rs # Re-exports
81-
├── format.rs # Primitive formatting functions (tool output, warnings)
82-
├── logging.rs # OutputSink trait, log_event functions
83-
└── text_buffer.rs # TextBuffer for streaming markdown
79+
├── src/
80+
│ ├── lib.rs # Re-exports
81+
│ ├── format.rs # Primitive formatting functions (tool output, warnings)
82+
│ ├── logging.rs # OutputSink trait, log_event functions
83+
│ └── text_buffer.rs # TextBuffer for streaming markdown
84+
└── tests/
85+
├── common/mod.rs # Shared test helpers (strip_ansi, RAII guards, CaptureSink)
86+
├── acp_simulation_tests.rs # 29 tests simulating ACP agent patterns
87+
└── e2e_tests.rs # 19 PTY-based tests for actual terminal output
8488
```
8589

8690
**Design**: clemitui takes primitive types (strings, durations, token counts), not genai-rs types. This allows it to work with any ACP agent. clemini's format.rs re-exports these and adds genai-rs-specific wrappers.
8791

92+
Run clemitui tests: `cargo test -p clemitui`
93+
8894
### Event-Driven Architecture
8995

9096
The agent (`src/agent.rs`) is decoupled from UI via channel-based events:
@@ -105,8 +111,9 @@ run_interaction() UI Layer
105111
- `ToolResult(FunctionExecutionResult)` - Tool completed (uses genai-rs type)
106112
- `ToolOutput(String)` - Tool output to display (emitted by tools via `ToolEmitter` trait)
107113
- `Complete { interaction_id, response }` - Interaction finished
108-
- `ContextWarning { used, limit, percentage }` - Context window >80%
114+
- `ContextWarning(ContextWarning)` - Context window >80%
109115
- `Cancelled` - User cancelled
116+
- `Retry { attempt, max_attempts, delay, error }` - API retry in progress
110117

111118
**`EventHandler` trait** (`src/events.rs`): All UI modes implement this trait:
112119
- `TerminalEventHandler` (`events.rs`) - REPL and non-interactive modes
@@ -154,9 +161,12 @@ Debugging: `LOUD_WIRE=1` logs all HTTP requests/responses.
154161

155162
## Documentation
156163

164+
- [CHANGELOG.md](CHANGELOG.md) - Version history and notable changes
157165
- [docs/TOOLS.md](docs/TOOLS.md) - Tool reference, design philosophy, implementation guide
158166
- [docs/TEXT_RENDERING.md](docs/TEXT_RENDERING.md) - Output formatting guidelines (colors, truncation, spacing)
159167

168+
**Changelog updates required**: Any user-facing changes (new features, behavior changes, bug fixes) must be documented in CHANGELOG.md before merging.
169+
160170
## Conventions
161171

162172
- Rust 2024 edition (let chains, etc.)
@@ -196,6 +206,9 @@ If you're unsure whether coverage is sufficient, add more tests. Undertesting ca
196206
- `semantic_integration_tests.rs` - Multi-turn state, error recovery, code analysis
197207
- `acp_integration_tests.rs` - ACP subagent spawning and communication
198208
- `background_tasks_tests.rs` - Background task execution and output retrieval
209+
- `comprehensive_agent_tests.rs` - Agent interaction patterns, tool chaining, error recovery
210+
- `plan_mode_tests.rs` - Plan mode entry/exit, tool restrictions, state management
211+
- `terminal_tests.rs` - PTY-based REPL tests (history, ctrl-c, shell escape, builtins)
199212
- `event_ordering_tests.rs` - Tool output event ordering (no API key required)
200213

201214
Run locally with: `cargo test --test <name> -- --include-ignored --nocapture`

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "3"
44

55
[package]
66
name = "clemini"
7-
version = "0.2.0"
7+
version = "0.4.0"
88
edition = "2024"
99
rust-version = "1.88"
1010
description = "A Gemini-powered coding CLI, built with genai-rs"

docs/TOOLS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Every tool needs tests covering:
105105

106106
5. **Register in `CleminiToolService`** in `src/tools/mod.rs`
107107

108-
6. **Update the System Instruction** in `src/main.rs` SYSTEM_PROMPT
108+
6. **Update the System Instruction** in `src/system_prompt.md`
109109

110110
7. **Run quality gates**: `make clippy && make fmt && make test`
111111

0 commit comments

Comments
 (0)