156e3ffde9
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / lint (pull_request) Successful in 13s
CI / typecheck (pull_request) Successful in 27s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m38s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 9m35s
CI / docker (pull_request) Successful in 37s
CI / coverage (pull_request) Successful in 6m57s
173 lines
5.5 KiB
Markdown
173 lines
5.5 KiB
Markdown
# Plan CLI Reference
|
|
|
|
The `agents plan` command group manages plans in the CleverAgents v3
|
|
plan lifecycle.
|
|
|
|
## Plan Use
|
|
|
|
```bash
|
|
agents plan use <ACTION> [PROJECT ...] [OPTIONS]
|
|
```
|
|
|
|
Create a plan from an action template. The first positional argument is
|
|
the **action name** (namespaced, e.g. `local/code-coverage`). All
|
|
subsequent positional arguments are **project names** the plan will
|
|
operate on. Projects can also be supplied via the repeatable
|
|
`--project` / `-p` option.
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|-------------------------|-------|----------------------------------------------------------|
|
|
| `--project` | `-p` | Project name (repeatable) |
|
|
| `--arg` | `-a` | Argument value `name=value` (repeatable) |
|
|
| `--automation-profile` | | Automation profile name for this plan |
|
|
| `--invariant` | | Invariant constraint text (repeatable) |
|
|
| `--strategy-actor` | | Override the strategy actor |
|
|
| `--execution-actor` | | Override the execution actor |
|
|
| `--estimation-actor` | | Override the estimation actor |
|
|
| `--invariant-actor` | | Override the invariant reconciliation actor |
|
|
| `--automation-level` | | `manual`, `review_before_apply`, or `full_automation` |
|
|
| `--format` | `-f` | Output format: json, yaml, plain, table, rich (default: rich) |
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Single project via positional arg
|
|
agents plan use local/code-coverage my-project --arg target_coverage=80
|
|
|
|
# Multiple projects via positional args
|
|
agents plan use local/lint proj-a proj-b
|
|
|
|
# JSON output
|
|
agents plan use local/lint proj-a --format json
|
|
|
|
# YAML output
|
|
agents plan use local/lint proj-a --format yaml
|
|
```
|
|
|
|
## Plan List (lifecycle-list)
|
|
|
|
```bash
|
|
agents plan lifecycle-list [REGEX] [OPTIONS]
|
|
```
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|----------------------|-------|-----------------------------------------------------------|
|
|
| `--phase` | | Filter by phase (`strategize`, `execute`, `apply`, `applied`) |
|
|
| `--state` | | Filter by processing state (`queued`, `processing`, `errored`, `complete`, `cancelled`) |
|
|
| `--processing-state` | | Alias for `--state` |
|
|
| `--project` | `-p` | Filter by project name |
|
|
| `--action` | | Filter by action name |
|
|
| `--format` | `-f` | Output format: json, yaml, plain, table, rich (default: rich) |
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# List all plans
|
|
agents plan lifecycle-list
|
|
|
|
# JSON output
|
|
agents plan lifecycle-list --format json
|
|
|
|
# YAML output
|
|
agents plan lifecycle-list --format yaml
|
|
|
|
# Filter by phase + JSON output
|
|
agents plan lifecycle-list --phase strategize --format json
|
|
```
|
|
|
|
### JSON/YAML Output Keys
|
|
|
|
| Key | Description |
|
|
|----------------------|--------------------------------------|
|
|
| `plan_id` | Unique ULID identifier |
|
|
| `namespaced_name` | Full namespaced plan name |
|
|
| `phase` | Current lifecycle phase |
|
|
| `processing_state` | Processing state |
|
|
| `project_links` | List of linked projects |
|
|
| `arguments` | Resolved argument values |
|
|
| `automation_profile` | Automation profile name (or null) |
|
|
| `action_name` | Source action name |
|
|
|
|
## Plan Status
|
|
|
|
```bash
|
|
agents plan status [PLAN_ID] [OPTIONS]
|
|
```
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|------------|-------|----------------------------------|
|
|
| `--format` | `-f` | Output format (default: rich) |
|
|
|
|
Without a plan ID, shows a summary table of all active plans.
|
|
With a plan ID, shows full details.
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Rich panel (default)
|
|
agents plan status 01HXYZ...
|
|
|
|
# JSON output
|
|
agents plan status 01HXYZ... --format json
|
|
|
|
# Plain text output
|
|
agents plan status 01HXYZ... --format plain
|
|
```
|
|
|
|
## Plan Execute
|
|
|
|
```bash
|
|
agents plan execute [PLAN_ID] [OPTIONS]
|
|
```
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|------------|-------|----------------------------------|
|
|
| `--format` | `-f` | Output format (default: rich) |
|
|
|
|
## Plan Lifecycle-Apply
|
|
|
|
```bash
|
|
agents plan lifecycle-apply [PLAN_ID] [OPTIONS]
|
|
```
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|------------|-------|----------------------------------|
|
|
| `--format` | `-f` | Output format (default: rich) |
|
|
|
|
## Plan Cancel
|
|
|
|
```bash
|
|
agents plan cancel <PLAN_ID> [OPTIONS]
|
|
```
|
|
|
|
### Options
|
|
|
|
| Flag | Short | Description |
|
|
|------------|-------|----------------------------|
|
|
| `--reason` | `-r` | Reason for cancellation |
|
|
| `--format` | `-f` | Output format (default: rich) |
|
|
|
|
### Example
|
|
|
|
```bash
|
|
agents plan cancel 01HXYZ... --reason "Requirements changed"
|
|
agents plan cancel 01HXYZ... --reason "Changed" --format json
|
|
```
|
|
|
|
## Source Location
|
|
|
|
- CLI commands: `src/cleveragents/cli/commands/plan.py`
|
|
- Lifecycle service: `src/cleveragents/application/services/plan_lifecycle_service.py`
|
|
- Plan model: `src/cleveragents/domain/models/core/plan.py`
|
|
- Formatting helpers: `src/cleveragents/cli/formatting.py`
|