# Plan 4: Examples and API Documentation Sync

## Objective
Ensure that all features available in the Edge Explorer (like choosing queues, accounts, and handling notifications) are well-documented and demonstrated in the Python example scripts.

## Implementation Steps

### 1. Update `example_psij.py`
- **File**: `examples/example_psij.py`
- **Action**: Add logic to demonstrate how to use the `queue_info` plugin to find valid queues/accounts programmatically before submitting a job.
- **Action**: Add comments explaining the `job_spec` dictionary structure, especially the `attributes` section.

### 2. Update `example_rhapsody.py`
- **File**: `examples/example_rhapsody.py`
- **Action**: Ensure it covers backend selection (e.g., `dragon_v3`, `flux`) and result collection.

### 3. General Documentation (CLAUDE.md / README.md)
- **File**: `README.md`
- **Action**: Add a section on "Programming with Radical Edge" that points to these enhanced examples.
- **Action**: Document the expected dictionary schemas for the most common plugins (`sysinfo`, `psij`, `rhapsody`).

## Test Plan
1. **Script Execution**:
    - Run all scripts in `examples/` and ensure they execute without discovery gaps.
    - Example: `python3 examples/example_psij.py` should now ideally be able to auto-discover a queue if one isn't provided in the config.
2. **Review**:
    - verify that a new user reading the examples can understand how to pass custom Slurm attributes or select a specific backend without looking at the source code of the plugins.
