# Changelog

All notable changes to the SUNWÆE CLI will be documented here.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This workspace adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---

## [Unreleased]

## Added

- **`gen` module** - LLM module with all models and providers, ReAct loop and REPL

## Changed

- modules now have plural commands (e.g. `sunwaee log` -> `sunwaee logs`, `sunwaee note` -> `sunwaee notes`)

## [1.0.1] - 2026-03-02

### Added

- **`log` module** - append-only activity log per workspace, stored as JSON Lines files under `<workspace>/logs/<year>/<month>/<day>/logs.jsonl`
  - `log list` - list activity logs; defaults to today; supports `--date`, `--month`, `--all`, `--module`, `--operation`, `--caller`, `--query`, `--limit`
  - `LogEntry` model (`modules/logs/model.py`) with `timestamp`, `caller`, `workspace`, `module`, `operation`, `ok`, `item_id`, `item_title`, `args` fields
- **Audit logging** - every mutation command (`create`, `edit`, `delete`, `complete`, `uncomplete`, `set-default`) automatically appends a log entry via `core/audit.py`
- **List commands are now logged** - `note list`, `task list`, and `log list` each write a log entry with an `args` field capturing active filters and result count
- `--query` filter on `note list` and `task list` - case-insensitive substring match across title, tags, and body; replaces the former dedicated `search` sub-commands
- `--query` filter on `log list` - matches across item title, id, module, operation, caller, and workspace fields
- `note list` and `task list` now default to **all workspaces**; a **Workspace** column is shown when no `--workspace` flag is given
- `note show`, `note edit`, `note delete`, `task show`, `task edit`, `task complete`, `task uncomplete`, `task delete` now search across all workspaces when `--workspace` is not specified

### Removed

- `note search` and `task search` sub-commands - use `note list --query` and `task list --query` instead

## [1.0.0] - 2026-02-28

### Added

- `task complete` command (replaces `task done`) - marks a task and all subtasks as done, records `completed_at` timestamp
- `task uncomplete` command - resets a task (and subtasks) back to `todo`, clears `completed_at`
- `completed_at` field on the Task model - set automatically by `task complete`, cleared by `task uncomplete` or `task edit --status <non-done>`
- `task list --show-completed` - completed tasks are hidden by default to reduce token usage for LLMs; pass this flag to include them
- `task list --due <expr>` - filter by due date using `today`, `tomorrow`, `this-week`, `this-month`, `overdue`, or `YYYY-MM-DD`
- Natural language due dates on `task create` and `task edit --due` - same expressions accepted (except `overdue`)
- `task edit --clear-due` - explicitly remove the due date from a task
- `task list --sort` - sort by `updated` (default), `created`, `title`, `due`, `priority`
- `note list --sort` - sort by `updated` (default), `created`, `title`
- `sunwaee init` command - creates config and default workspace in a single step; supports `--workspace` (name) and `--force` (re-initialise) flags
- `sunwaee/core/logger.py` - structured logging under the `sunwaee.*` hierarchy; log level controlled via `SUNWAEE_LOG_LEVEL` env var (`debug`, `info`, `warning`, `error`, `critical`; default `warning`)
- Log calls across all layers: `config.py` (config load/save, default workspace changes), `core/fs.py` (read/write/find), `modules/notes`, `modules/tasks`, `modules/workspaces` (create/update/delete operations)
- Workspace-based data organization: all data lives under `~/sunwaee/workspaces/<workspace>/<module>/`
- `sunwaee workspace create / list / set-default / delete` commands
- `--workspace` flag on all `note` and `task` commands (falls back to configured default)
- `SUNWAEE_WORKSPACES_DIR` and `SUNWAEE_WORKSPACE` env var overrides
- `workspace` field included in all JSON API responses for notes and tasks
- `tomli-w` dependency for writing `~/.sunwaee/config.toml`
- `sun note create / list / show / edit / delete / search` commands
- `sun task create / list / show / done / edit / delete / search` commands
- `SUNWAEE_CALLER` env var - controls output format (`human` → rich, `api`/`sun` → JSON)
- `SUNWAEE_NOTES_DIR` and `SUNWAEE_TASKS_DIR` env var overrides
- `~/.sunwaee/config.toml` base config (created on first run)
- Human-readable Markdown + YAML frontmatter storage (`~/notes/`, `~/tasks/`)
- Standardized JSON response envelope: `{"ok": true, "data": ...}` / `{"ok": false, "error": ..., "code": ...}`
- `--confirm` flag required on all destructive commands
- Auto-discovery module system - new domains require zero changes to core code
- `$EDITOR` integration for interactive body editing (human caller only)
