Skip to content

Implement missing session management commands (destroy, cleanup, info) #5

@Wirasm

Description

@Wirasm

Problem

The regression test revealed that several essential session management commands are missing from the SHARDS CLI.

Missing Commands

shards destroy <session>

  • Should remove a specific session
  • Clean up worktree directory
  • Remove git branch (local and remote)
  • Remove session from persistence registry
  • Kill any running processes

shards cleanup

  • Should clean up orphaned sessions
  • Remove sessions with missing worktree directories
  • Clean up stale git branches
  • Validate and repair session registry

shards info <session>

  • Should show detailed information about a session
  • Display worktree path, git branch, agent type, creation time
  • Show current status (active, orphaned, etc.)

Current Behavior

  • shards destroy: Command not recognized
  • shards cleanup: Command not recognized
  • shards info: Command not recognized

Expected Behavior

All three commands should be implemented and working as described above.

Acceptance Criteria

  • shards destroy <session> removes session completely
  • shards cleanup handles orphaned sessions
  • shards info <session> shows session details
  • All commands have proper error handling
  • Commands are covered by regression tests
  • Documentation is updated

Related

This was discovered during regression testing in scripts/regression-test.sh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions