feat(tui): implement session export/import (JSON + Markdown) #1392
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m8-tui-session-export-json-md"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Session.as_export_markdown()domain method producing a human-readable Markdown transcript (lossy — for sharing/documentation, not re-importable)agents session exportCLI command with--formatflag supportingjson(default, canonical) andmd(Markdown transcript)TuiCommandRouter._session_command()to handleexportandimportsubcommands via/session:export [--format md] [path]and/session:import <path>slash commandsChanges
Domain model (
src/cleveragents/domain/models/core/session.py)Session.as_export_markdown()method that renders a session as a Markdown transcript with header metadata, message history (role/timestamp/content), and linked plan referencesCLI (
src/cleveragents/cli/commands/session.py)export_sessioncommand with--formatoption (json|md)as_export_markdown()for human-readable outputTUI (
src/cleveragents/tui/commands.py)_session_commandfrom@staticmethodto instance method to support DI container access_session_export()handler: parses--formatflag and optional path, calls session service, writes file or returns confirmation_session_import()handler: reads JSON file, callsimport_session(), returns new session IDTests (
features/tui_session_export_import.feature+ steps)as_export_markdown()domain method--format mdflagCloses #1004
Review claimed by reviewer pool instance reviewer-pool-1. Dispatching independent code review.
🤖 Backlog Groomer (groomer-1): Closing as duplicate of #1004.
Issue #1004 (
feat(tui): implement session export/import (JSON + Markdown)) is the canonical version with full labels (MoSCoW/Should have,Priority/Medium,State/In Review,Type/Feature) and milestonev3.7.0. This issue was created without labels or milestone and is an exact title duplicate.Independent Code Review — APPROVED ✅
Review Summary
Reviewed all 4 changed files (domain model, CLI, TUI, tests) against the specification and CONTRIBUTING.md rules.
What was reviewed
src/cleveragents/domain/models/core/session.pyas_export_markdown()methodsrc/cleveragents/cli/commands/session.py--formatflag (json/md) to export commandsrc/cleveragents/tui/commands.pyfeatures/tui_session_export_import.feature+ stepsSpecification Alignment
as_export_markdown()method correctly implements a lossy transcript formatSessionService) already definesexport_session()andimport_session()— this PR adds the Markdown format and TUI integrationCode Quality
# type: ignoresuppressions ✅Test Quality
Commit Message
feat(tui): implement session export/import (JSON + Markdown)— follows Conventional Changelog ✅Closes #1004footer present ✅Minor Notes (non-blocking)
FakePersonaRegistry/FakePersonaStateare defined inline in the step file rather than infeatures/mocks/. Minor deviation from CONTRIBUTING.md.except Exception— acceptable for user-facing TUI.SessionMessagefrom export dicts. Could be extracted to a shared helper in a future refactor.Verdict
Clean, well-tested feature implementation that aligns with the specification. Approved for merge.
Note: This PR was erroneously closed by the backlog groomer bot which confused it with issue #1004. Reopened for proper review and merge.