UAT: TUI session:export supports --format md/txt but spec only defines JSON export — undocumented format extension #4871

Open
opened 2026-04-08 20:11:04 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: TUI Interface — Session Export (ADR-046)

What Was Tested

TuiCommandRouter._session_export() in src/cleveragents/tui/commands.py

Expected Behavior (from spec ADR-046)

The spec defines /session:export as:

/session:export [path] — Export the current session's conversation history to a JSON file

The spec only specifies JSON format for session export.

Actual Behavior

_session_export() supports three formats:

  • json (default) — matches spec
  • md — Markdown format (not in spec)
  • txt — Plain text format (not in spec)
if fmt not in ("json", "md", "txt"):
    return f"Invalid format: {fmt!r}. Use 'json', 'md', or 'txt'."

The implementation also uses --format flag syntax (/session:export --format md path) which is not documented in the spec's command reference.

Code Location

src/cleveragents/tui/commands.py_session_export() method

Impact

This is a positive deviation (extra functionality) but represents undocumented behavior. The md and txt formats are not in the spec, so:

  1. Users who discover these formats may rely on them, creating a de-facto API
  2. The spec should be updated to document these formats, or the implementation should be restricted to JSON only

This should be tracked as a spec-vs-implementation divergence for the architect to decide whether to accept or revert.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** TUI Interface — Session Export (ADR-046) ### What Was Tested `TuiCommandRouter._session_export()` in `src/cleveragents/tui/commands.py` ### Expected Behavior (from spec ADR-046) The spec defines `/session:export` as: > `/session:export [path]` — Export the current session's conversation history to a **JSON file** The spec only specifies JSON format for session export. ### Actual Behavior `_session_export()` supports three formats: - `json` (default) — matches spec - `md` — Markdown format (not in spec) - `txt` — Plain text format (not in spec) ```python if fmt not in ("json", "md", "txt"): return f"Invalid format: {fmt!r}. Use 'json', 'md', or 'txt'." ``` The implementation also uses `--format` flag syntax (`/session:export --format md path`) which is not documented in the spec's command reference. ### Code Location `src/cleveragents/tui/commands.py` — `_session_export()` method ### Impact This is a **positive deviation** (extra functionality) but represents undocumented behavior. The `md` and `txt` formats are not in the spec, so: 1. Users who discover these formats may rely on them, creating a de-facto API 2. The spec should be updated to document these formats, or the implementation should be restricted to JSON only This should be tracked as a spec-vs-implementation divergence for the architect to decide whether to accept or revert. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-08 20:15:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#4871
No description provided.