## 2026-02-24

- Implemented the `-e` / `--e` / `--enter` CLI flags to control automatic carriage return injection after Telegram messages, defaulting to enabled for backward compatibility.
- Updated `README.md` with a comprehensive "Magical Use Cases" section covering remote VPS management, AI agent monitoring, and Obsidian integration.
- Added PyPI version and download count badges to the top of the `README.md` file.
- Conducted a comprehensive security and performance audit of the codebase, identifying critical vulnerabilities like environment variable leaks and input sanitization risks alongside performance bottlenecks such as polling overhead and task churn.
- Summarized the completed security and performance improvements, including environment scrubbing, input sanitization, and PTY monitoring optimizations, and confirmed system stability with a passing test suite.
- Fixed a regression where PTY data leaked into Telegram by correctly flagging it as mirror-only when an output stream is active, verified with a new reproduction test.
- Fixed a syntax error in the router tests, verified the final terminal restoration implementation with the test suite, and removed the temporary reproduction script.
- Added a test comment to `src/gramit/cli.py` and enabled the `AfterAgent` hook for automated journal/changelog tracking.
- Implemented the `/commit` custom command in `GEMINI.md` to automate intelligent grouping and committing of changes using Conventional Commits format.
- Implemented a new `AfterAgent` hook `run-make-validation` that automatically runs `make` (tests and linting) on every turn and blocks the agent if it fails.
- Configured sequential hook execution in `settings.json` to ensure validation runs before record-keeping.
- Fixed multiple lint errors in `src/gramit/router.py`, `tests/test_output_stream_leak.py`, and `.gemini/hooks/gemini_logger.py` to ensure `make` passes.
- Fixed a bug where the terminal screen was not being cleared correctly on exit (via `/quit` or `Ctrl+C`).
- Refactored `cli.py` to ensure the orchestrated process is shut down *before* restoring the terminal, and added explicit screen-clearing sequences to `restore_terminal`.
- Refined and enabled the `AfterAgent` hook in `.gemini/hooks/gemini_logger.py` to ensure automated record-keeping for significant changes.
- Fixed the `-e` / `--enter` option by sending the carriage return as a separate PTY input and added `--e` as an explicit CLI alias.
- Added `/maintainance` custom Gemini CLI command for deep codebase analysis and step-by-step refactoring.
- Performed a comprehensive codebase maintenance refactor, extracting terminal utilities, adding logging, and enhancing documentation and test coverage across all core components.
- Redirected default logging to 'gramit.log' to avoid TUI drawing interference on the local terminal.
