fix(cli): remove --namespace/-n option from agents plan list per spec #3267

Merged
freemo merged 1 commit from fix/plan-list-remove-namespace-option into master 2026-04-05 21:08:49 +00:00
Owner

Summary

Removes the incorrectly implemented --namespace/-n option from the agents plan list CLI command, which deviated from the specification. The spec defines agents plan list with only --phase, --state, --project, --action, and an optional <REGEX> positional argument — namespace filtering is already achievable via the <REGEX> argument (e.g. agents plan list "^myteam/").

Changes

  • Removed namespace parameter from lifecycle_list_plans() in src/cleveragents/cli/commands/plan.py — the --namespace/-n Click option and its corresponding function parameter have been deleted
  • Removed namespace=namespace from service.list_plans() call — the CLI no longer passes a namespace argument to the service layer
  • Removed Namespace: row from TUI Filters panel — the filter display panel no longer renders a namespace filter entry, keeping the UI consistent with the spec
  • Updated docstring examples in lifecycle_list_plans() to remove all --namespace flag references
  • Updated filter panel condition to exclude the namespace check from the active-filters display logic
  • Removed 4 namespace-related Behave scenarios from features/plan_cli_spec_alignment.feature that were testing the now-removed option
  • Removed corresponding step definitions from features/steps/plan_cli_spec_alignment_steps.py for the deleted scenarios

Design Decisions

The --namespace/-n option was an undocumented deviation from docs/specification.md, which defines the agents plan list signature as:

agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>]

No --namespace option appears in the spec. Namespace-scoped listing is already supported by the positional <REGEX> argument — users can pass a regex anchored to a namespace prefix (e.g. "^myteam/") to achieve the same filtering without a dedicated flag.

The service layer's list_plans() method intentionally retains its namespace parameter, as other internal callers (non-CLI) may rely on it. Only the CLI surface is corrected here, keeping the fix minimal and non-breaking for programmatic consumers.

Testing

  • Lint: ✓ clean
  • Format: ✓ clean
  • Typecheck: ✓ 0 errors, 0 warnings
  • 4 namespace-related scenarios removed, remaining scenarios unaffected

Modules Affected

  • src/cleveragents/cli/commands/plan.py — CLI command definition and TUI filter panel
  • features/plan_cli_spec_alignment.feature — Behave feature file (4 scenarios removed)
  • features/steps/plan_cli_spec_alignment_steps.py — Behave step definitions (namespace steps removed)

Closes #2986


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

## Summary Removes the incorrectly implemented `--namespace`/`-n` option from the `agents plan list` CLI command, which deviated from the specification. The spec defines `agents plan list` with only `--phase`, `--state`, `--project`, `--action`, and an optional `<REGEX>` positional argument — namespace filtering is already achievable via the `<REGEX>` argument (e.g. `agents plan list "^myteam/"`). ## Changes - **Removed `namespace` parameter from `lifecycle_list_plans()`** in `src/cleveragents/cli/commands/plan.py` — the `--namespace`/`-n` Click option and its corresponding function parameter have been deleted - **Removed `namespace=namespace` from `service.list_plans()` call** — the CLI no longer passes a namespace argument to the service layer - **Removed `Namespace:` row from TUI Filters panel** — the filter display panel no longer renders a namespace filter entry, keeping the UI consistent with the spec - **Updated docstring examples** in `lifecycle_list_plans()` to remove all `--namespace` flag references - **Updated filter panel condition** to exclude the namespace check from the active-filters display logic - **Removed 4 namespace-related Behave scenarios** from `features/plan_cli_spec_alignment.feature` that were testing the now-removed option - **Removed corresponding step definitions** from `features/steps/plan_cli_spec_alignment_steps.py` for the deleted scenarios ## Design Decisions The `--namespace`/`-n` option was an undocumented deviation from `docs/specification.md`, which defines the `agents plan list` signature as: ``` agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>] ``` No `--namespace` option appears in the spec. Namespace-scoped listing is already supported by the positional `<REGEX>` argument — users can pass a regex anchored to a namespace prefix (e.g. `"^myteam/"`) to achieve the same filtering without a dedicated flag. The service layer's `list_plans()` method intentionally retains its `namespace` parameter, as other internal callers (non-CLI) may rely on it. Only the CLI surface is corrected here, keeping the fix minimal and non-breaking for programmatic consumers. ## Testing - Lint: ✓ clean - Format: ✓ clean - Typecheck: ✓ 0 errors, 0 warnings - 4 namespace-related scenarios removed, remaining scenarios unaffected ## Modules Affected - `src/cleveragents/cli/commands/plan.py` — CLI command definition and TUI filter panel - `features/plan_cli_spec_alignment.feature` — Behave feature file (4 scenarios removed) - `features/steps/plan_cli_spec_alignment_steps.py` — Behave step definitions (namespace steps removed) Closes #2986 --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
fix(cli): remove --namespace/-n from agents plan list command
Some checks failed
CI / lint (pull_request) Successful in 21s
CI / typecheck (pull_request) Successful in 49s
CI / quality (pull_request) Successful in 41s
CI / security (pull_request) Successful in 1m1s
CI / build (pull_request) Successful in 17s
CI / helm (pull_request) Successful in 23s
CI / unit_tests (pull_request) Successful in 6m45s
CI / e2e_tests (pull_request) Successful in 17m7s
CI / integration_tests (pull_request) Failing after 23m11s
CI / docker (pull_request) Successful in 1m24s
CI / coverage (pull_request) Successful in 10m54s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m52s
fc7e47f66b
Remove the --namespace/-n option from the agents plan list CLI command
as it is not defined in the specification. The spec defines:

  agents plan list [--phase <PHASE>] [--state <STATE>]
                   [--project <PROJECT>] [--action <ACTION>] [<REGEX>]

Namespace filtering is already supported via the positional <REGEX>
argument (e.g. 'agents plan list "^myteam/"').

Changes:
- Remove namespace parameter from lifecycle_list_plans() function
- Remove namespace=namespace from service.list_plans() call
- Remove Namespace row from TUI Filters panel
- Update docstring examples to remove --namespace references
- Update filter panel condition to exclude namespace check
- Remove 4 namespace-related scenarios from plan_cli_spec_alignment.feature
- Remove corresponding step definitions from plan_cli_spec_alignment_steps.py

ISSUES CLOSED: #2986
freemo added this to the v3.7.0 milestone 2026-04-05 08:51:12 +00:00
Author
Owner

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3267-1775373600]


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3267-1775373600] --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
Author
Owner

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3267-1775373000]


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3267-1775373000] --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
freemo left a comment

Self-Review: APPROVED

(Posted as COMMENT because Forgejo prevents self-approval — this PR was authored by the same account.)

Summary

This PR correctly removes the --namespace/-n option from agents plan list, which was an undocumented deviation from the specification. The spec defines the command signature as:

agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>]
                [--action <ACTION>] [<REGEX>]

No --namespace option appears in the spec, and namespace filtering is already achievable via the <REGEX> positional argument (e.g. "^myteam/").

What was reviewed

Criterion Result
Spec alignment CLI signature now matches spec exactly
Code correctness Clean removal — no dangling references to removed parameter
Service layer preserved list_plans() retains namespace param for internal callers
TUI Filters panel Namespace row removed, matching spec's example output
Filter panel logic Condition correctly excludes namespace
Docstring examples Updated to show regex approach per spec
Test coverage 4 namespace scenarios removed; remaining scenarios cover all spec-defined filters
Step definitions No orphaned steps — 3 @when + 1 @then cleanly removed
Commit message Follows Conventional Changelog format
PR metadata Closes #2986, has Type/Bug label, has milestone
Security No secrets, no injection risks

Design decision endorsement

The choice to only remove the CLI surface while preserving the service layer's namespace parameter is the right call — it keeps the fix minimal and non-breaking for any internal programmatic consumers.

Verdict

Clean, well-scoped fix. No issues found. Code review complete — ready for merge once CI passes and approval requirements are met.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Self-Review: APPROVED ✅ (Posted as COMMENT because Forgejo prevents self-approval — this PR was authored by the same account.) ### Summary This PR correctly removes the `--namespace`/`-n` option from `agents plan list`, which was an undocumented deviation from the specification. The spec defines the command signature as: ``` agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>] ``` No `--namespace` option appears in the spec, and namespace filtering is already achievable via the `<REGEX>` positional argument (e.g. `"^myteam/"`). ### What was reviewed | Criterion | Result | |---|---| | **Spec alignment** | ✅ CLI signature now matches spec exactly | | **Code correctness** | ✅ Clean removal — no dangling references to removed parameter | | **Service layer preserved** | ✅ `list_plans()` retains `namespace` param for internal callers | | **TUI Filters panel** | ✅ Namespace row removed, matching spec's example output | | **Filter panel logic** | ✅ Condition correctly excludes namespace | | **Docstring examples** | ✅ Updated to show regex approach per spec | | **Test coverage** | ✅ 4 namespace scenarios removed; remaining scenarios cover all spec-defined filters | | **Step definitions** | ✅ No orphaned steps — 3 `@when` + 1 `@then` cleanly removed | | **Commit message** | ✅ Follows Conventional Changelog format | | **PR metadata** | ✅ Closes #2986, has `Type/Bug` label, has milestone | | **Security** | ✅ No secrets, no injection risks | ### Design decision endorsement The choice to only remove the CLI surface while preserving the service layer's `namespace` parameter is the right call — it keeps the fix minimal and non-breaking for any internal programmatic consumers. ### Verdict Clean, well-scoped fix. No issues found. Code review complete — ready for merge once CI passes and approval requirements are met. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo scheduled this pull request to auto merge when all checks succeed 2026-04-05 09:36:23 +00:00
freemo left a comment

Independent Review — Approved (Self-Review)

Note: Forgejo prevents self-approval since the PR author and reviewer share the same API token. This is a COMMENT review documenting the full independent review findings. The PR is approved from a code quality perspective.

What was reviewed

All three changed files were reviewed against the specification and project conventions:

  • src/cleveragents/cli/commands/plan.py — CLI command definition
  • features/plan_cli_spec_alignment.feature — Behave scenarios
  • features/steps/plan_cli_spec_alignment_steps.py — Step definitions

Specification Alignment ✓

The spec defines agents plan list with only --phase, --state, --project, --action, and <REGEX>. The --namespace/-n option was an undocumented deviation. This PR correctly removes it, and the docstring examples now show the regex-based alternative ("^myteam/").

API Consistency ✓

Good design decision to retain the namespace parameter in the service layer's list_plans() method for internal callers while removing only the CLI surface. This keeps the fix minimal and non-breaking for programmatic consumers.

Test Quality ✓

Four namespace-related Behave scenarios and their step definitions are properly removed. No orphaned steps remain. Remaining scenarios are unaffected.

Correctness ✓

  • No dangling namespace references in the CLI layer (remaining namespace references in plan.py are for namespaced_name plan properties — completely unrelated)
  • Filter panel condition correctly updated to exclude namespace check
  • active_filters list no longer includes the Namespace row

Code Quality ✓

Clean, focused removal. No unnecessary changes. Diff is minimal and well-scoped.

Commit Format ✓

  • Conventional Changelog: fix(cli): remove --namespace/-n from agents plan list command
  • Detailed body explaining rationale
  • ISSUES CLOSED: #2986 footer present

PR Metadata ✓

  • Type/Bug label ✓
  • Milestone v3.7.0 ✓
  • Closes #2986 in body ✓

No concerns. Clean spec-alignment fix.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## ✅ Independent Review — Approved (Self-Review) > **Note:** Forgejo prevents self-approval since the PR author and reviewer share the same API token. This is a COMMENT review documenting the full independent review findings. The PR is approved from a code quality perspective. ### What was reviewed All three changed files were reviewed against the specification and project conventions: - `src/cleveragents/cli/commands/plan.py` — CLI command definition - `features/plan_cli_spec_alignment.feature` — Behave scenarios - `features/steps/plan_cli_spec_alignment_steps.py` — Step definitions ### Specification Alignment ✓ The spec defines `agents plan list` with only `--phase`, `--state`, `--project`, `--action`, and `<REGEX>`. The `--namespace/-n` option was an undocumented deviation. This PR correctly removes it, and the docstring examples now show the regex-based alternative (`"^myteam/"`). ### API Consistency ✓ Good design decision to retain the `namespace` parameter in the service layer's `list_plans()` method for internal callers while removing only the CLI surface. This keeps the fix minimal and non-breaking for programmatic consumers. ### Test Quality ✓ Four namespace-related Behave scenarios and their step definitions are properly removed. No orphaned steps remain. Remaining scenarios are unaffected. ### Correctness ✓ - No dangling namespace references in the CLI layer (remaining `namespace` references in plan.py are for `namespaced_name` plan properties — completely unrelated) - Filter panel condition correctly updated to exclude namespace check - `active_filters` list no longer includes the Namespace row ### Code Quality ✓ Clean, focused removal. No unnecessary changes. Diff is minimal and well-scoped. ### Commit Format ✓ - Conventional Changelog: `fix(cli): remove --namespace/-n from agents plan list command` - Detailed body explaining rationale - `ISSUES CLOSED: #2986` footer present ### PR Metadata ✓ - `Type/Bug` label ✓ - Milestone v3.7.0 ✓ - `Closes #2986` in body ✓ No concerns. Clean spec-alignment fix. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo left a comment

Independent Code Review — APPROVED

Note: Posted as COMMENT because Forgejo prevents self-approval (shared API token with PR author). This is a full independent review with approval recommendation.

Review Focus Areas

  • specification-compliance | requirements-coverage | behavior-correctness

Files Reviewed

File Change
src/cleveragents/cli/commands/plan.py Removed --namespace/-n option, service call arg, TUI filter row, docstring examples, filter condition
features/plan_cli_spec_alignment.feature Removed 4 namespace-related scenarios
features/steps/plan_cli_spec_alignment_steps.py Removed 4 corresponding step definitions (3 @when + 1 @then)

Specification Compliance

The formal command synopsis in docs/specification.md (lines 323–324 and 12109–12112) defines:

agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>]
                 [--action <ACTION>] [<REGEX>]

No --namespace option appears in the authoritative synopsis. The docs/reference/plan_cli.md options table (lines 110–117) also omits --namespace. This PR correctly aligns the CLI implementation with the spec.

Requirements Coverage

All subtasks from issue #2986 are addressed:

  • namespace parameter removed from lifecycle_list_plans() function signature
  • namespace=namespace removed from service.list_plans() call
  • Namespace: row removed from TUI Filters panel
  • Docstring examples updated to remove --namespace references
  • Filter panel condition updated to exclude namespace check
  • 4 namespace-related Behave scenarios removed
  • Corresponding step definitions removed (no orphaned steps)

Behavior Correctness

  • Service layer preserved: The list_plans() method retains its namespace parameter for internal/programmatic callers — correct design decision to keep the fix minimal and non-breaking.
  • Regex alternative works: Users can achieve namespace filtering via agents plan list "^myteam/" per the spec's <REGEX> positional argument.
  • No dangling references: The remaining namespace references in plan.py (e.g., namespaced_name, validate_namespaced_actor) are unrelated to the removed CLI option.
  • Filter panel logic: The condition correctly no longer checks for namespace.

Code Quality

  • Clean, focused removal — no unnecessary changes
  • Commit message follows Conventional Changelog format
  • Commit footer has ISSUES CLOSED: #2986
  • Type/Bug label present
  • Single atomic commit

Observations (Non-blocking)

  1. Milestone Discrepancy: Issue #2986 is on milestone v3.2.0, but this PR is on milestone v3.7.0. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled.

  2. Spec Internal Contradiction (Informational): The specification itself contains contradictory content — the formal command synopsis (lines 323–324, 12109–12112) omits --namespace, but the "Multi-User Workflow" examples (lines 41938, 41971) still use agents plan list --namespace myteam and show a Namespace: row in the Filters panel (line 41953). A follow-up issue should be filed to update those spec examples to use the regex approach instead (e.g., agents plan list "^myteam/").

Verdict

Clean, well-scoped spec-alignment fix. All requirements met. No code correctness issues found. The two observations above are non-blocking metadata/documentation items.

Recommendation: APPROVE


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Independent Code Review — APPROVED ✅ > **Note:** Posted as COMMENT because Forgejo prevents self-approval (shared API token with PR author). This is a full independent review with approval recommendation. ### Review Focus Areas - **specification-compliance** | **requirements-coverage** | **behavior-correctness** ### Files Reviewed | File | Change | |------|--------| | `src/cleveragents/cli/commands/plan.py` | Removed `--namespace`/`-n` option, service call arg, TUI filter row, docstring examples, filter condition | | `features/plan_cli_spec_alignment.feature` | Removed 4 namespace-related scenarios | | `features/steps/plan_cli_spec_alignment_steps.py` | Removed 4 corresponding step definitions (3 `@when` + 1 `@then`) | ### Specification Compliance ✅ The formal command synopsis in `docs/specification.md` (lines 323–324 and 12109–12112) defines: ``` agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>] ``` No `--namespace` option appears in the authoritative synopsis. The `docs/reference/plan_cli.md` options table (lines 110–117) also omits `--namespace`. This PR correctly aligns the CLI implementation with the spec. ### Requirements Coverage ✅ All subtasks from issue #2986 are addressed: - [x] `namespace` parameter removed from `lifecycle_list_plans()` function signature - [x] `namespace=namespace` removed from `service.list_plans()` call - [x] `Namespace:` row removed from TUI Filters panel - [x] Docstring examples updated to remove `--namespace` references - [x] Filter panel condition updated to exclude namespace check - [x] 4 namespace-related Behave scenarios removed - [x] Corresponding step definitions removed (no orphaned steps) ### Behavior Correctness ✅ - **Service layer preserved**: The `list_plans()` method retains its `namespace` parameter for internal/programmatic callers — correct design decision to keep the fix minimal and non-breaking. - **Regex alternative works**: Users can achieve namespace filtering via `agents plan list "^myteam/"` per the spec's `<REGEX>` positional argument. - **No dangling references**: The remaining `namespace` references in `plan.py` (e.g., `namespaced_name`, `validate_namespaced_actor`) are unrelated to the removed CLI option. - **Filter panel logic**: The condition correctly no longer checks for `namespace`. ### Code Quality ✅ - Clean, focused removal — no unnecessary changes - Commit message follows Conventional Changelog format - Commit footer has `ISSUES CLOSED: #2986` - `Type/Bug` label present - Single atomic commit ### Observations (Non-blocking) 1. **Milestone Discrepancy**: Issue #2986 is on milestone **v3.2.0**, but this PR is on milestone **v3.7.0**. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled. 2. **Spec Internal Contradiction (Informational)**: The specification itself contains contradictory content — the formal command synopsis (lines 323–324, 12109–12112) omits `--namespace`, but the "Multi-User Workflow" examples (lines 41938, 41971) still use `agents plan list --namespace myteam` and show a `Namespace:` row in the Filters panel (line 41953). A follow-up issue should be filed to update those spec examples to use the regex approach instead (e.g., `agents plan list "^myteam/"`). ### Verdict Clean, well-scoped spec-alignment fix. All requirements met. No code correctness issues found. The two observations above are non-blocking metadata/documentation items. **Recommendation: APPROVE** ✅ --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo left a comment

Independent Code Review — PR #3267

Review Focus Areas

specification-compliance | behavior-correctness | api-consistency

PR Summary

Removes the --namespace/-n CLI option from agents plan list, which was an undocumented deviation from the specification. The spec defines:

agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>]
                 [--action <ACTION>] [<REGEX>]

No --namespace option appears in the authoritative command synopsis. Namespace filtering is already achievable via the <REGEX> positional argument (e.g. "^myteam/").

Files Reviewed

File Change Verified
src/cleveragents/cli/commands/plan.py Removed --namespace/-n option, service call arg, TUI filter row, docstring examples, filter condition (via size diff: 135844→135400 bytes, -444 bytes)
features/plan_cli_spec_alignment.feature Removed 4 namespace-related scenarios (fully decoded and compared)
features/steps/plan_cli_spec_alignment_steps.py Removed 4 corresponding step definitions (fully decoded and compared)

1. Specification Compliance

The spec's agents plan list command synopsis omits --namespace. This PR correctly removes the non-spec option from the CLI surface. The regex alternative (agents plan list "^myteam/") provides equivalent functionality through the spec-defined <REGEX> positional argument.

2. Behavior Correctness

Feature file analysis (fully verified via base64 decode):

  • 4 scenarios cleanly removed:
    • Plan list with --namespace filter (long form)
    • Plan list with -n namespace filter (short form)
    • Plan list with --namespace shows Namespace in Filters panel
    • Plan list with --namespace combined with --state
  • Remaining 18 scenarios are untouched and cover all spec-defined filters: --phase, --state, --processing-state, --project, --action, <REGEX>, and combined filters
  • No scenario references the removed --namespace option

Step definitions analysis (fully verified via base64 decode):

  • 4 step definitions cleanly removed:
    • step_plan_list_namespace (@when — long form --namespace)
    • step_plan_list_short_namespace (@when — short form -n)
    • step_plan_list_namespace_and_state (@when — combined namespace + state)
    • step_plan_list_namespace_passed (@then — verify namespace passed to service)
  • No orphaned step definitions remain — every remaining @when/@then has a corresponding scenario in the feature file

3. API Consistency

Good design decision to retain the namespace parameter in the service layer's list_plans() method while removing only the CLI surface. This:

  • Keeps the fix minimal and non-breaking for programmatic consumers
  • Preserves the internal API contract for any non-CLI callers
  • Follows the principle of least surprise — only the user-facing CLI is corrected

4. Commit & PR Metadata

Criterion Status
Conventional Changelog format fix(cli): remove --namespace/-n from agents plan list command
Commit body explains rationale Detailed explanation with spec reference
ISSUES CLOSED: #2986 footer Present
Closes #2986 in PR body Present
Type/Bug label Present
Single atomic commit One commit on branch
No # type: ignore Not introduced

5. Observations (Non-blocking)

  1. Milestone Discrepancy: Issue #2986 is assigned to milestone v3.2.0, but this PR is assigned to milestone v3.7.0. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled — either the PR milestone should be updated to v3.2.0, or the issue milestone should be updated to v3.7.0 if the scope has shifted.

  2. Spec Internal Contradiction (Informational): The specification's formal command synopsis omits --namespace, but the "Multi-User Workflow" narrative examples elsewhere in the spec still reference agents plan list --namespace myteam and show a Namespace: row in the Filters panel. A follow-up issue should be filed to update those spec examples to use the regex approach (e.g. agents plan list "^myteam/") for full internal consistency.

  3. Coverage Impact: The PR removes 4 test scenarios without adding replacements. This is correct since the tested functionality is being removed, but the coverage report should be verified to ensure the ≥97% threshold is maintained after the removal of both code and tests.

Verdict

Clean, well-scoped spec-alignment fix. All three focus areas (specification-compliance, behavior-correctness, api-consistency) pass review. The removal is consistent across CLI code, feature file, and step definitions. No code correctness issues found.

Recommendation: APPROVE (posted as COMMENT due to review policy)


Automated by CleverAgents Bot
Reviewer: Code Quality | Agent: ca-pr-self-reviewer

## Independent Code Review — PR #3267 ### Review Focus Areas **specification-compliance** | **behavior-correctness** | **api-consistency** ### PR Summary Removes the `--namespace`/`-n` CLI option from `agents plan list`, which was an undocumented deviation from the specification. The spec defines: ``` agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>] ``` No `--namespace` option appears in the authoritative command synopsis. Namespace filtering is already achievable via the `<REGEX>` positional argument (e.g. `"^myteam/"`). ### Files Reviewed | File | Change | Verified | |------|--------|----------| | `src/cleveragents/cli/commands/plan.py` | Removed `--namespace`/`-n` option, service call arg, TUI filter row, docstring examples, filter condition | ✅ (via size diff: 135844→135400 bytes, -444 bytes) | | `features/plan_cli_spec_alignment.feature` | Removed 4 namespace-related scenarios | ✅ (fully decoded and compared) | | `features/steps/plan_cli_spec_alignment_steps.py` | Removed 4 corresponding step definitions | ✅ (fully decoded and compared) | --- ### 1. Specification Compliance ✅ The spec's `agents plan list` command synopsis omits `--namespace`. This PR correctly removes the non-spec option from the CLI surface. The regex alternative (`agents plan list "^myteam/"`) provides equivalent functionality through the spec-defined `<REGEX>` positional argument. ### 2. Behavior Correctness ✅ **Feature file analysis** (fully verified via base64 decode): - 4 scenarios cleanly removed: - `Plan list with --namespace filter (long form)` - `Plan list with -n namespace filter (short form)` - `Plan list with --namespace shows Namespace in Filters panel` - `Plan list with --namespace combined with --state` - Remaining 18 scenarios are untouched and cover all spec-defined filters: `--phase`, `--state`, `--processing-state`, `--project`, `--action`, `<REGEX>`, and combined filters - No scenario references the removed `--namespace` option **Step definitions analysis** (fully verified via base64 decode): - 4 step definitions cleanly removed: - `step_plan_list_namespace` (`@when` — long form `--namespace`) - `step_plan_list_short_namespace` (`@when` — short form `-n`) - `step_plan_list_namespace_and_state` (`@when` — combined namespace + state) - `step_plan_list_namespace_passed` (`@then` — verify namespace passed to service) - No orphaned step definitions remain — every remaining `@when`/`@then` has a corresponding scenario in the feature file ### 3. API Consistency ✅ Good design decision to retain the `namespace` parameter in the service layer's `list_plans()` method while removing only the CLI surface. This: - Keeps the fix minimal and non-breaking for programmatic consumers - Preserves the internal API contract for any non-CLI callers - Follows the principle of least surprise — only the user-facing CLI is corrected ### 4. Commit & PR Metadata ✅ | Criterion | Status | |-----------|--------| | Conventional Changelog format | ✅ `fix(cli): remove --namespace/-n from agents plan list command` | | Commit body explains rationale | ✅ Detailed explanation with spec reference | | `ISSUES CLOSED: #2986` footer | ✅ Present | | `Closes #2986` in PR body | ✅ Present | | `Type/Bug` label | ✅ Present | | Single atomic commit | ✅ One commit on branch | | No `# type: ignore` | ✅ Not introduced | ### 5. Observations (Non-blocking) 1. **Milestone Discrepancy**: Issue #2986 is assigned to milestone **v3.2.0**, but this PR is assigned to milestone **v3.7.0**. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled — either the PR milestone should be updated to v3.2.0, or the issue milestone should be updated to v3.7.0 if the scope has shifted. 2. **Spec Internal Contradiction (Informational)**: The specification's formal command synopsis omits `--namespace`, but the "Multi-User Workflow" narrative examples elsewhere in the spec still reference `agents plan list --namespace myteam` and show a `Namespace:` row in the Filters panel. A follow-up issue should be filed to update those spec examples to use the regex approach (e.g. `agents plan list "^myteam/"`) for full internal consistency. 3. **Coverage Impact**: The PR removes 4 test scenarios without adding replacements. This is correct since the tested functionality is being removed, but the coverage report should be verified to ensure the ≥97% threshold is maintained after the removal of both code and tests. ### Verdict Clean, well-scoped spec-alignment fix. All three focus areas (specification-compliance, behavior-correctness, api-consistency) pass review. The removal is consistent across CLI code, feature file, and step definitions. No code correctness issues found. **Recommendation: APPROVE** ✅ (posted as COMMENT due to review policy) --- **Automated by CleverAgents Bot** Reviewer: Code Quality | Agent: ca-pr-self-reviewer
freemo left a comment

Independent Code Review — PR #3267 — APPROVED

Note: Posted as COMMENT because Forgejo prevents self-approval (shared API token with PR author). This is a full independent review with approval recommendation.

Review Focus Areas

specification-compliance | requirements-coverage | behavior-correctness


PR Summary

Removes the --namespace/-n CLI option from agents plan list, which was an undocumented deviation from the specification. The spec's authoritative command synopsis (lines 12109–12112) defines:

agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>]
                 [--action <ACTION>] [<REGEX>]

No --namespace option appears. Namespace filtering is already achievable via the <REGEX> positional argument (e.g. "^myteam/").

Files Reviewed

File Change
src/cleveragents/cli/commands/plan.py Removed --namespace/-n option, namespace=namespace service call arg, Namespace: TUI filter row, docstring examples, filter condition
features/plan_cli_spec_alignment.feature Removed 4 namespace-related scenarios
features/steps/plan_cli_spec_alignment_steps.py Removed 4 corresponding step definitions (3 @when + 1 @then)

1. Specification Compliance

The formal command synopsis in docs/specification.md (lines 323–324 and 12109–12112) omits --namespace. The Arguments section (lines 12119–12122) lists only --phase, --state, --project, and --action. This PR correctly removes the non-spec option from the CLI surface.

The updated docstring examples now show the regex-based alternative (agents plan list "^myteam/") which is the spec-intended approach for namespace filtering.

2. Requirements Coverage

All subtasks from issue #2986 are addressed:

  • namespace parameter removed from lifecycle_list_plans() function signature
  • namespace=namespace removed from service.list_plans() call
  • Namespace: row removed from TUI Filters panel
  • Docstring examples updated to remove --namespace references
  • Filter panel condition updated to exclude namespace check
  • 4 namespace-related Behave scenarios removed
  • Corresponding step definitions removed (no orphaned steps)

3. Behavior Correctness

CLI code analysis (verified via full commit diff):

  • namespace parameter cleanly removed from function signature (lines 2314–2321)
  • service.list_plans() call no longer passes namespace=namespace — now only passes phase=phase_filter, project_name=project_id
  • Namespace: row removed from active_filters list (lines 2505–2508)
  • Filter panel display condition correctly updated: if phase_filter or state_filter or project_id or action_filter: (namespace removed)
  • No dangling references to the removed parameter — remaining namespace references in plan.py are for namespaced_name plan properties and validate_namespaced_actor, which are completely unrelated

Feature file analysis (verified via base64 decode and comparison with master):

  • 4 scenarios cleanly removed: long form --namespace, short form -n, Filters panel display, combined --namespace + --state
  • Remaining 18 scenarios untouched, covering all spec-defined filters: --phase, --state, --processing-state, --project, --action, <REGEX>, and combined filters

Step definitions analysis (verified via base64 decode and comparison with master):

  • 4 step definitions cleanly removed: step_plan_list_namespace, step_plan_list_short_namespace, step_plan_list_namespace_and_state, step_plan_list_namespace_passed
  • No orphaned step definitions remain

Service layer preserved: The list_plans() method retains its namespace parameter for internal/programmatic callers — correct design decision to keep the fix minimal and non-breaking.

4. Code Quality & Conventions

Criterion Status
Conventional Changelog format fix(cli): remove --namespace/-n from agents plan list command
Commit body explains rationale Detailed explanation with spec reference
ISSUES CLOSED: #2986 footer Present
Closes #2986 in PR body Present
Type/Bug label Present
Single atomic commit One commit on branch
No # type: ignore Not introduced
No forbidden patterns Clean

5. Observations (Non-blocking)

  1. Milestone Discrepancy: Issue #2986 is assigned to milestone v3.2.0, but this PR is assigned to milestone v3.7.0. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled.

  2. Spec Internal Contradiction: The specification's formal command synopsis omits --namespace, but the "Multi-User Workflow" narrative examples elsewhere in the spec (lines 41938, 41953, 41971) still reference agents plan list --namespace myteam and show a Namespace: row in the Filters panel. A follow-up issue should be filed to update those spec examples to use the regex approach (e.g. agents plan list "^myteam/") for full internal consistency. Without this follow-up, the spec will continue to contain contradictory content that could confuse future implementers.

  3. Coverage Impact: 4 test scenarios removed without replacements. This is correct since the tested functionality is being removed, but the coverage report should be verified to ensure the ≥97% threshold is maintained.


Verdict

Clean, well-scoped spec-alignment fix. All three focus areas (specification-compliance, requirements-coverage, behavior-correctness) pass review. The removal is consistent across CLI code, feature file, and step definitions. No code correctness issues found. The non-blocking observations above are metadata/documentation items that should be addressed separately.

Decision: APPROVED


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

## Independent Code Review — PR #3267 — APPROVED ✅ > **Note:** Posted as COMMENT because Forgejo prevents self-approval (shared API token with PR author). This is a full independent review with **approval recommendation**. ### Review Focus Areas **specification-compliance** | **requirements-coverage** | **behavior-correctness** --- ### PR Summary Removes the `--namespace`/`-n` CLI option from `agents plan list`, which was an undocumented deviation from the specification. The spec's authoritative command synopsis (lines 12109–12112) defines: ``` agents plan list [--phase <PHASE>] [--state <STATE>] [--project <PROJECT>] [--action <ACTION>] [<REGEX>] ``` No `--namespace` option appears. Namespace filtering is already achievable via the `<REGEX>` positional argument (e.g. `"^myteam/"`). ### Files Reviewed | File | Change | |------|--------| | `src/cleveragents/cli/commands/plan.py` | Removed `--namespace`/`-n` option, `namespace=namespace` service call arg, `Namespace:` TUI filter row, docstring examples, filter condition | | `features/plan_cli_spec_alignment.feature` | Removed 4 namespace-related scenarios | | `features/steps/plan_cli_spec_alignment_steps.py` | Removed 4 corresponding step definitions (3 `@when` + 1 `@then`) | --- ### 1. Specification Compliance ✅ The formal command synopsis in `docs/specification.md` (lines 323–324 and 12109–12112) omits `--namespace`. The Arguments section (lines 12119–12122) lists only `--phase`, `--state`, `--project`, and `--action`. This PR correctly removes the non-spec option from the CLI surface. The updated docstring examples now show the regex-based alternative (`agents plan list "^myteam/"`) which is the spec-intended approach for namespace filtering. ### 2. Requirements Coverage ✅ All subtasks from issue #2986 are addressed: - [x] `namespace` parameter removed from `lifecycle_list_plans()` function signature - [x] `namespace=namespace` removed from `service.list_plans()` call - [x] `Namespace:` row removed from TUI Filters panel - [x] Docstring examples updated to remove `--namespace` references - [x] Filter panel condition updated to exclude namespace check - [x] 4 namespace-related Behave scenarios removed - [x] Corresponding step definitions removed (no orphaned steps) ### 3. Behavior Correctness ✅ **CLI code analysis** (verified via full commit diff): - `namespace` parameter cleanly removed from function signature (lines 2314–2321) - `service.list_plans()` call no longer passes `namespace=namespace` — now only passes `phase=phase_filter, project_name=project_id` - `Namespace:` row removed from active_filters list (lines 2505–2508) - Filter panel display condition correctly updated: `if phase_filter or state_filter or project_id or action_filter:` (namespace removed) - No dangling references to the removed parameter — remaining `namespace` references in plan.py are for `namespaced_name` plan properties and `validate_namespaced_actor`, which are completely unrelated **Feature file analysis** (verified via base64 decode and comparison with master): - 4 scenarios cleanly removed: long form `--namespace`, short form `-n`, Filters panel display, combined `--namespace` + `--state` - Remaining 18 scenarios untouched, covering all spec-defined filters: `--phase`, `--state`, `--processing-state`, `--project`, `--action`, `<REGEX>`, and combined filters **Step definitions analysis** (verified via base64 decode and comparison with master): - 4 step definitions cleanly removed: `step_plan_list_namespace`, `step_plan_list_short_namespace`, `step_plan_list_namespace_and_state`, `step_plan_list_namespace_passed` - No orphaned step definitions remain **Service layer preserved**: The `list_plans()` method retains its `namespace` parameter for internal/programmatic callers — correct design decision to keep the fix minimal and non-breaking. ### 4. Code Quality & Conventions ✅ | Criterion | Status | |-----------|--------| | Conventional Changelog format | ✅ `fix(cli): remove --namespace/-n from agents plan list command` | | Commit body explains rationale | ✅ Detailed explanation with spec reference | | `ISSUES CLOSED: #2986` footer | ✅ Present | | `Closes #2986` in PR body | ✅ Present | | `Type/Bug` label | ✅ Present | | Single atomic commit | ✅ One commit on branch | | No `# type: ignore` | ✅ Not introduced | | No forbidden patterns | ✅ Clean | ### 5. Observations (Non-blocking) 1. **Milestone Discrepancy**: Issue #2986 is assigned to milestone **v3.2.0**, but this PR is assigned to milestone **v3.7.0**. Per CONTRIBUTING.md, PRs should be assigned to the same milestone as their linked issue. This metadata should be reconciled. 2. **Spec Internal Contradiction**: The specification's formal command synopsis omits `--namespace`, but the "Multi-User Workflow" narrative examples elsewhere in the spec (lines 41938, 41953, 41971) still reference `agents plan list --namespace myteam` and show a `Namespace:` row in the Filters panel. A follow-up issue should be filed to update those spec examples to use the regex approach (e.g. `agents plan list "^myteam/"`) for full internal consistency. Without this follow-up, the spec will continue to contain contradictory content that could confuse future implementers. 3. **Coverage Impact**: 4 test scenarios removed without replacements. This is correct since the tested functionality is being removed, but the coverage report should be verified to ensure the ≥97% threshold is maintained. --- ### Verdict Clean, well-scoped spec-alignment fix. All three focus areas (specification-compliance, requirements-coverage, behavior-correctness) pass review. The removal is consistent across CLI code, feature file, and step definitions. No code correctness issues found. The non-blocking observations above are metadata/documentation items that should be addressed separately. **Decision: APPROVED** ✅ --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
freemo merged commit db61d66d80 into master 2026-04-05 21:08:42 +00:00
freemo removed this from the v3.7.0 milestone 2026-04-07 00:11:38 +00:00
Sign in to join this conversation.
No reviewers
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!3267
No description provided.