# Symphony Orchestration CLI Documentation

## Installation and Running

1. Ensure Python 3.8+ is installed
2. Install dependencies: `pip install -r requirements.txt`
3. Run the CLI: `python cli_interface.py`

## Available Commands

### `add_task`
Adds a new task to the system with RBAC validation

**Usage:**
```bash
add_task --task-id [TASK_ID] --user [USERNAME]
```

**Parameters:**
- `--task-id`: Unique identifier for the task (required)
- `--user`: Username of person adding task (required)

**Example:**
```bash
add_task --task-id TASK-123 --user admin
```

**Output:**
```
Added task TASK-123
```

### `get_next_task`
Retrieves the next available task with RBAC validation

**Usage:**
```bash
get_next_task --user [USERNAME]
```

**Parameters:**
- `--user`: Username of person requesting task (required)

**Example:**
```bash
get_next_task --user developer
```

**Output:**
```
Retrieved next task
```

### `process_task`
Processes a specified task with RBAC validation

**Usage:**
```bash
process_task --task-id [TASK_ID] --user [USERNAME]
```

**Parameters:**
- `--task-id`: ID of task to process (required)
- `--user`: Username of person processing task (required)

**Example:**
```bash
process_task --task-id TASK-123 --user developer
```

**Output:**
```
Processed task TASK-123
```

### `validate_permissions`
Validates if a user has specific permissions

**Usage:**
```bash
validate_permissions --user [USERNAME] --permission [PERMISSION]
```

**Parameters:**
- `--user`: Username to validate (required)
- `--permission`: Permission to check (required)

**Example:**
```bash
validate_permissions --user developer --permission task_process
```

**Output:**
```
Permission granted
```

## Security Features

1. All commands are audited and logged
2. Role-Based Access Control (RBAC) validates permissions before execution
3. Execution times are measured and logged

## Error Handling

- Permission denied messages will display when RBAC validation fails
- All failed attempts are logged in the audit system