feat(tui): implement persona export/import (YAML format) #1246

Closed
brent.edwards wants to merge 1 commit from feature/m8-tui-persona-export-import into master
Member

Summary

Implements persona export/import in YAML format with schema validation, round-trip fidelity, and CLI commands.

Changes

CLI Commands (new)

  • agents persona export <name> [--output path] — Export a persona to a YAML file
  • agents persona import <path> [--overwrite] — Import a persona from a YAML file
  • Registered persona command group in main CLI (src/cleveragents/cli/commands/persona.py)

TUI Command Router (enhanced)

  • /persona:export <name> [path] — Export persona via TUI slash command
  • /persona:import <path> — Import persona via TUI slash command
  • Colon-style command alias parsing (/persona:exportpersona + export)

Tests

  • 11 Behave BDD scenarios in features/tui_persona_export_import.feature:
    • Export persona to YAML file
    • Import persona from YAML file
    • Round-trip fidelity (export then import preserves all fields)
    • Export default filename when no output path given
    • Export non-existent persona raises error
    • Import from non-existent file raises error
    • Import invalid YAML raises error
    • Import YAML with schema validation error raises error
    • Export path traversal is rejected
    • Import path traversal is rejected
    • Import persona with presets preserves preset data
  • TUI command router coverage for export/import slash commands
  • Robot Framework smoke test for TUI persona export/import commands

Architecture

The PersonaRegistry.export_persona() and import_persona() methods already existed in the TUI domain layer (cleveragents.tui.persona.registry). This PR adds:

  1. CLI presentation layer (agents persona export/import)
  2. TUI command router integration (/persona:export, /persona:import)
  3. Comprehensive BDD and Robot test coverage

Closes #1005

## Summary Implements persona export/import in YAML format with schema validation, round-trip fidelity, and CLI commands. ## Changes ### CLI Commands (new) - `agents persona export <name> [--output path]` — Export a persona to a YAML file - `agents persona import <path> [--overwrite]` — Import a persona from a YAML file - Registered `persona` command group in main CLI (`src/cleveragents/cli/commands/persona.py`) ### TUI Command Router (enhanced) - `/persona:export <name> [path]` — Export persona via TUI slash command - `/persona:import <path>` — Import persona via TUI slash command - Colon-style command alias parsing (`/persona:export` → `persona` + `export`) ### Tests - 11 Behave BDD scenarios in `features/tui_persona_export_import.feature`: - Export persona to YAML file - Import persona from YAML file - Round-trip fidelity (export then import preserves all fields) - Export default filename when no output path given - Export non-existent persona raises error - Import from non-existent file raises error - Import invalid YAML raises error - Import YAML with schema validation error raises error - Export path traversal is rejected - Import path traversal is rejected - Import persona with presets preserves preset data - TUI command router coverage for export/import slash commands - Robot Framework smoke test for TUI persona export/import commands ## Architecture The `PersonaRegistry.export_persona()` and `import_persona()` methods already existed in the TUI domain layer (`cleveragents.tui.persona.registry`). This PR adds: 1. CLI presentation layer (`agents persona export/import`) 2. TUI command router integration (`/persona:export`, `/persona:import`) 3. Comprehensive BDD and Robot test coverage Closes #1005
feat(tui): add persona export/import command support
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / helm (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m57s
CI / security (pull_request) Successful in 4m8s
CI / unit_tests (pull_request) Successful in 9m10s
CI / docker (pull_request) Successful in 1m18s
CI / e2e_tests (pull_request) Failing after 12m7s
CI / coverage (pull_request) Successful in 12m27s
CI / integration_tests (pull_request) Successful in 25m9s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Successful in 55m18s
3b6c0455b8
Support /persona:export with optional output path and /persona:import from YAML files in the TUI command router, including colon command alias parsing.

Expand Behave and Robot smoke coverage for persona export/import command flows and update changelog entries.

ISSUES CLOSED: #1005
brent.edwards scheduled this pull request to auto merge when all checks succeed 2026-04-01 19:19:22 +00:00
Owner

🔒 Claimed by pr-reviewer-5. Starting independent code review.

🔒 Claimed by pr-reviewer-5. Starting independent code review.
freemo self-assigned this 2026-04-02 08:06:14 +00:00
Owner

⚠️ Merge Conflict Detected — PR #1246 cannot be merged until conflicts are resolved by the implementing agent.

This PR (feature/m8-tui-persona-export-import) has merge conflicts with master. Please rebase onto the latest master and resolve all conflicts before this PR can be reviewed and merged.

⚠️ **Merge Conflict Detected** — PR #1246 cannot be merged until conflicts are resolved by the implementing agent. This PR (`feature/m8-tui-persona-export-import`) has merge conflicts with `master`. Please rebase onto the latest `master` and resolve all conflicts before this PR can be reviewed and merged.
freemo added this to the v3.7.0 milestone 2026-04-02 08:09:33 +00:00
freemo force-pushed feature/m8-tui-persona-export-import from 3b6c0455b8
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / helm (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m57s
CI / security (pull_request) Successful in 4m8s
CI / unit_tests (pull_request) Successful in 9m10s
CI / docker (pull_request) Successful in 1m18s
CI / e2e_tests (pull_request) Failing after 12m7s
CI / coverage (pull_request) Successful in 12m27s
CI / integration_tests (pull_request) Successful in 25m9s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Successful in 55m18s
to b0666fd460
Some checks failed
CI / security (pull_request) Failing after 2s
CI / unit_tests (pull_request) Failing after 1s
CI / integration_tests (pull_request) Failing after 2s
CI / e2e_tests (pull_request) Failing after 1s
CI / build (pull_request) Failing after 1s
CI / helm (pull_request) Failing after 2s
CI / lint (pull_request) Successful in 25s
CI / typecheck (pull_request) Successful in 51s
CI / docker (pull_request) Has been skipped
CI / quality (pull_request) Successful in 3m42s
CI / coverage (pull_request) Successful in 12m48s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 55m11s
2026-04-02 09:10:53 +00:00
Compare
freemo changed title from feat(tui): add persona export/import command support to feat(tui): implement persona export/import (YAML format) 2026-04-02 09:11:13 +00:00
Owner

🤖 Backlog Groomer (groomer-1) — Duplicate Detected

This PR (#1246) is a duplicate of the canonical tracking issue #1005 ("feat(tui): implement persona export/import (YAML format)").

Rationale:

  • #1005 is the original tracking issue with full metadata: MoSCoW label, Points, Priority, State/In Review, parent link to #868, and dependency tracking via #926.
  • This PR (#1246) was opened later and its body explicitly states Closes #1005, confirming it is the implementation PR for that tracking issue.
  • The PR itself is not a separate work item — it is the delivery vehicle for #1005.

Action: Closing this issue as a duplicate of #1005. All tracking, review, and merge activity should be associated with #1005.

🤖 **Backlog Groomer (groomer-1) — Duplicate Detected** This PR (#1246) is a duplicate of the canonical tracking issue **#1005** ("feat(tui): implement persona export/import (YAML format)"). **Rationale:** - #1005 is the original tracking issue with full metadata: MoSCoW label, Points, Priority, State/In Review, parent link to #868, and dependency tracking via #926. - This PR (#1246) was opened later and its body explicitly states `Closes #1005`, confirming it is the implementation PR for that tracking issue. - The PR itself is not a separate work item — it is the delivery vehicle for #1005. **Action:** Closing this issue as a duplicate of #1005. All tracking, review, and merge activity should be associated with #1005.
freemo closed this pull request 2026-04-02 16:22:12 +00:00
Some checks failed
CI / security (pull_request) Failing after 2s
Required
Details
CI / unit_tests (pull_request) Failing after 1s
Required
Details
CI / integration_tests (pull_request) Failing after 2s
Required
Details
CI / e2e_tests (pull_request) Failing after 1s
CI / build (pull_request) Failing after 1s
Required
Details
CI / helm (pull_request) Failing after 2s
CI / lint (pull_request) Successful in 25s
Required
Details
CI / typecheck (pull_request) Successful in 51s
Required
Details
CI / docker (pull_request) Has been skipped
Required
Details
CI / quality (pull_request) Successful in 3m42s
Required
Details
CI / coverage (pull_request) Successful in 12m48s
Required
Details
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 55m11s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!1246
No description provided.