[BUG] Missing agents plan guard CLI command — v3.5.0 deliverable #12 not implemented #8967

Open
opened 2026-04-14 04:31:24 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: feat(cli): implement agents plan guard command for active guard inspection
  • Branch: feat/v3.5.0/plan-guard-command

Summary

The agents plan guard CLI command specified in v3.5.0 deliverable #12 is not implemented. The spec requires this command to show active guards for a plan (denylist, budget caps, tool call limits), but the command is absent from the agents plan command group.

Spec Reference: §CLI Commands — plan guard (docs/specification.md line 46955)

| 12 | agents plan guard shows active guards for a plan | §CLI Commands — plan guard | Command shows denylist, budget caps, tool limits |

Observed Behavior

Running agents plan --help does not list a guard subcommand. The registered plan commands are:
apply, artifacts, cancel, continue, correct, diff, errors, execute, explain, list, prompt, resume, revert, rollback, status, tree, use

The guard command is absent.

Expected Behavior

agents plan guard <PLAN_ID> should display the active automation guards for the given plan, including:

  • Active automation profile name and source
  • tool_denylist entries (if any)
  • tool_allowlist entries (if any)
  • max_tool_calls_per_step limit (if set)
  • max_total_cost budget cap (if set)
  • require_approval_for_writes flag
  • require_approval_for_apply flag

The command should support --format json|yaml|rich output modes consistent with other plan commands.

Acceptance Criteria

  • agents plan guard <PLAN_ID> command is registered in the agents plan command group
  • Command retrieves the plan's effective automation profile via AutomationProfileService
  • Command displays denylist, allowlist, budget caps, and tool call limits
  • Command supports --format json|yaml|rich output modes
  • Command returns a non-zero exit code for unknown plan IDs
  • BDD scenarios cover the happy path and error paths
  • nox passes with coverage ≥ 97%

Supporting Information

  • Spec location: docs/specification.md line 46955 (v3.5.0 deliverable table)
  • Guard model: src/cleveragents/domain/models/core/automation_guard.py
  • AutomationProfile.check_guard: src/cleveragents/domain/models/core/automation_profile.py line 277
  • AutomationProfileService.evaluate_guard: src/cleveragents/application/services/automation_profile_service.py line 251
  • Plan CLI: src/cleveragents/cli/commands/plan.py (guard command missing)
  • UAT Worker: [AUTO-UAT-8] — v3.5.0 A2A Facade & Guard Enforcement

Subtasks

  • Add @app.command("guard") handler to src/cleveragents/cli/commands/plan.py
  • Implement guard display logic: retrieve plan's automation profile, extract guard fields
  • Support --format json|yaml|rich output modes
  • Add error handling for unknown plan IDs (non-zero exit code)
  • Write BDD feature file features/plan_guard_command.feature with scenarios
  • Write step definitions in features/steps/plan_guard_command_steps.py
  • Verify coverage ≥ 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Filed by [AUTO-UAT-8] UAT Test Worker — v3.5.0 A2A Facade & Guard Enforcement


Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `feat(cli): implement agents plan guard command for active guard inspection` - **Branch**: `feat/v3.5.0/plan-guard-command` ## Summary The `agents plan guard` CLI command specified in v3.5.0 deliverable #12 is not implemented. The spec requires this command to show active guards for a plan (denylist, budget caps, tool call limits), but the command is absent from the `agents plan` command group. **Spec Reference**: §CLI Commands — plan guard (docs/specification.md line 46955) > | 12 | `agents plan guard` shows active guards for a plan | §CLI Commands — plan guard | Command shows denylist, budget caps, tool limits | ## Observed Behavior Running `agents plan --help` does not list a `guard` subcommand. The registered plan commands are: `apply`, `artifacts`, `cancel`, `continue`, `correct`, `diff`, `errors`, `execute`, `explain`, `list`, `prompt`, `resume`, `revert`, `rollback`, `status`, `tree`, `use` The `guard` command is absent. ## Expected Behavior `agents plan guard <PLAN_ID>` should display the active automation guards for the given plan, including: - Active automation profile name and source - `tool_denylist` entries (if any) - `tool_allowlist` entries (if any) - `max_tool_calls_per_step` limit (if set) - `max_total_cost` budget cap (if set) - `require_approval_for_writes` flag - `require_approval_for_apply` flag The command should support `--format json|yaml|rich` output modes consistent with other plan commands. ## Acceptance Criteria - [ ] `agents plan guard <PLAN_ID>` command is registered in the `agents plan` command group - [ ] Command retrieves the plan's effective automation profile via `AutomationProfileService` - [ ] Command displays denylist, allowlist, budget caps, and tool call limits - [ ] Command supports `--format json|yaml|rich` output modes - [ ] Command returns a non-zero exit code for unknown plan IDs - [ ] BDD scenarios cover the happy path and error paths - [ ] `nox` passes with coverage ≥ 97% ## Supporting Information - **Spec location**: `docs/specification.md` line 46955 (v3.5.0 deliverable table) - **Guard model**: `src/cleveragents/domain/models/core/automation_guard.py` - **AutomationProfile.check_guard**: `src/cleveragents/domain/models/core/automation_profile.py` line 277 - **AutomationProfileService.evaluate_guard**: `src/cleveragents/application/services/automation_profile_service.py` line 251 - **Plan CLI**: `src/cleveragents/cli/commands/plan.py` (guard command missing) - **UAT Worker**: [AUTO-UAT-8] — v3.5.0 A2A Facade & Guard Enforcement ## Subtasks - [ ] Add `@app.command("guard")` handler to `src/cleveragents/cli/commands/plan.py` - [ ] Implement guard display logic: retrieve plan's automation profile, extract guard fields - [ ] Support `--format json|yaml|rich` output modes - [ ] Add error handling for unknown plan IDs (non-zero exit code) - [ ] Write BDD feature file `features/plan_guard_command.feature` with scenarios - [ ] Write step definitions in `features/steps/plan_guard_command_steps.py` - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- *Filed by [AUTO-UAT-8] UAT Test Worker — v3.5.0 A2A Facade & Guard Enforcement* --- **Automated by CleverAgents Bot** Agent: new-issue-creator
Author
Owner

Verified — Missing CLI command agents plan guard is a v3.5.0 deliverable gap. MoSCoW: Must-have. Priority: High — guard enforcement is required for autonomy hardening.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — Missing CLI command `agents plan guard` is a v3.5.0 deliverable gap. MoSCoW: Must-have. Priority: High — guard enforcement is required for autonomy hardening. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
HAL9000 added this to the v3.5.0 milestone 2026-04-14 05:28:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#8967
No description provided.