UAT: agents project link-resource Rich output is a single line instead of spec-required Resource Linked, Access, and Indexing panels #3519

Open
opened 2026-04-05 18:48:53 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/project-link-resource-rich-output-panels
  • Commit Message: fix(cli): align project link-resource Rich output with spec — add Resource Linked, Access, and Indexing panels
  • Milestone: (none — backlog)
  • Parent Epic: #397

Background and Context

The agents project link-resource command's Rich terminal output and JSON output formats do not match the specification. This was discovered during UAT testing of the CLI output rendering layer.

The implementation outputs a single success line, but the spec (docs/specification.md, lines 2814–2841) requires three separate panels: Resource Linked, Access, and Indexing, followed by a status line.

Similarly, the JSON output format is missing the spec-required nested structure with resource_linked, access, and indexing sections.

Current Behavior

Rich output (from src/cleveragents/cli/commands/project.py, lines 702–707):

✓ Linked resource 'local/api-repo' to project 'local/api-service'.

JSON output (current flat structure):

{
  "project": "local/api-service",
  "resource_id": "...",
  "resource_name": "local/api-repo",
  "read_only": false,
  "alias": "..."
}

Expected Behavior

Rich output (from docs/specification.md, lines 2814–2841):

╭─ Resource Linked ───────────────────────╮
│ Project: local/api-service              │
│ Resource: local/api-repo                │
│ Type: git-checkout                      │
│ Read-Only: no                           │
╰─────────────────────────────────────────╯

╭─ Access ─────────────────╮
│ Read: allowed            │
│ Write: allowed           │
│ Apply: requires approval │
╰──────────────────────────╯

╭─ Indexing ─────────────────────╮
│ Status: indexing...            │
│ Files Found: 347               │
│ Language: Python (primary)     │
│ Estimated Time: ~20 seconds    │
╰────────────────────────────────╯

✓ OK Resource linked to project

JSON output (spec-required nested structure):

{
  "data": {
    "resource_linked": {
      "project": "local/api-service",
      "resource": "local/api-repo",
      "type": "git-checkout",
      "read_only": false
    },
    "access": {
      "read": "allowed",
      "write": "allowed",
      "apply": "requires approval"
    },
    "indexing": {
      "status": "indexing",
      "files_found": 347,
      "language": "Python (primary)",
      "estimated_time_seconds": 20
    }
  },
  "messages": [{ "level": "ok", "text": "Resource linked to project" }]
}

Acceptance Criteria

  • agents project link-resource Rich output renders three separate panels: Resource Linked, Access, and Indexing, each matching the spec layout exactly.
  • The status line ✓ OK Resource linked to project appears after the three panels.
  • agents project link-resource --output json returns the nested data structure with resource_linked, access, and indexing keys, plus a messages array.
  • The single success line is removed and replaced with the three-panel layout.
  • All existing agents project link-resource tests pass; new tests cover the three-panel Rich output and the nested JSON structure.

Supporting Information

  • Code location: src/cleveragents/cli/commands/project.py, link_resource() function, lines 648–720 (Rich output section at lines 702–707 needs replacement with three panels).
  • Spec reference: docs/specification.md, lines 2814–2841 (CLI output rendering for project link-resource).
  • Related: Epic #397 "Server & Autonomy Infrastructure" covers output rendering and CLI polish.

Subtasks

  • Replace the single success line in link_resource() (lines 702–707 of project.py) with three separate Rich panels: Resource Linked, Access, Indexing.
  • Add the ✓ OK Resource linked to project status line after the three panels.
  • Refactor the JSON output serializer for project link-resource to produce the nested data structure (resource_linked, access, indexing) plus messages array.
  • Add/update Behave scenarios covering the three-panel Rich output format.
  • Add/update Behave scenarios covering the nested JSON output format.
  • Run nox (all default sessions) and fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

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.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.5.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Branch**: `fix/project-link-resource-rich-output-panels` - **Commit Message**: `fix(cli): align project link-resource Rich output with spec — add Resource Linked, Access, and Indexing panels` - **Milestone**: *(none — backlog)* - **Parent Epic**: #397 ## Background and Context The `agents project link-resource` command's Rich terminal output and JSON output formats do not match the specification. This was discovered during UAT testing of the CLI output rendering layer. The implementation outputs a single success line, but the spec (`docs/specification.md`, lines 2814–2841) requires three separate panels: **Resource Linked**, **Access**, and **Indexing**, followed by a status line. Similarly, the JSON output format is missing the spec-required nested structure with `resource_linked`, `access`, and `indexing` sections. ## Current Behavior **Rich output** (from `src/cleveragents/cli/commands/project.py`, lines 702–707): ``` ✓ Linked resource 'local/api-repo' to project 'local/api-service'. ``` **JSON output** (current flat structure): ```json { "project": "local/api-service", "resource_id": "...", "resource_name": "local/api-repo", "read_only": false, "alias": "..." } ``` ## Expected Behavior **Rich output** (from `docs/specification.md`, lines 2814–2841): ``` ╭─ Resource Linked ───────────────────────╮ │ Project: local/api-service │ │ Resource: local/api-repo │ │ Type: git-checkout │ │ Read-Only: no │ ╰─────────────────────────────────────────╯ ╭─ Access ─────────────────╮ │ Read: allowed │ │ Write: allowed │ │ Apply: requires approval │ ╰──────────────────────────╯ ╭─ Indexing ─────────────────────╮ │ Status: indexing... │ │ Files Found: 347 │ │ Language: Python (primary) │ │ Estimated Time: ~20 seconds │ ╰────────────────────────────────╯ ✓ OK Resource linked to project ``` **JSON output** (spec-required nested structure): ```json { "data": { "resource_linked": { "project": "local/api-service", "resource": "local/api-repo", "type": "git-checkout", "read_only": false }, "access": { "read": "allowed", "write": "allowed", "apply": "requires approval" }, "indexing": { "status": "indexing", "files_found": 347, "language": "Python (primary)", "estimated_time_seconds": 20 } }, "messages": [{ "level": "ok", "text": "Resource linked to project" }] } ``` ## Acceptance Criteria - [ ] `agents project link-resource` Rich output renders three separate panels: **Resource Linked**, **Access**, and **Indexing**, each matching the spec layout exactly. - [ ] The status line `✓ OK Resource linked to project` appears after the three panels. - [ ] `agents project link-resource --output json` returns the nested `data` structure with `resource_linked`, `access`, and `indexing` keys, plus a `messages` array. - [ ] The single success line is removed and replaced with the three-panel layout. - [ ] All existing `agents project link-resource` tests pass; new tests cover the three-panel Rich output and the nested JSON structure. ## Supporting Information - **Code location**: `src/cleveragents/cli/commands/project.py`, `link_resource()` function, lines 648–720 (Rich output section at lines 702–707 needs replacement with three panels). - **Spec reference**: `docs/specification.md`, lines 2814–2841 (CLI output rendering for `project link-resource`). - **Related**: Epic #397 "Server & Autonomy Infrastructure" covers output rendering and CLI polish. ## Subtasks - [ ] Replace the single success line in `link_resource()` (lines 702–707 of `project.py`) with three separate Rich panels: Resource Linked, Access, Indexing. - [ ] Add the `✓ OK Resource linked to project` status line after the three panels. - [ ] Refactor the JSON output serializer for `project link-resource` to produce the nested `data` structure (`resource_linked`, `access`, `indexing`) plus `messages` array. - [ ] Add/update Behave scenarios covering the three-panel Rich output format. - [ ] Add/update Behave scenarios covering the nested JSON output format. - [ ] Run `nox` (all default sessions) and fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## 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. - All nox stages pass. - Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.5.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 20:07:07 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low — CLI output formatting. agents project link-resource shows a single success line instead of spec-required Resource Linked, Access, and Indexing panels.
  • Milestone: v3.7.0
  • Story Points: 2 — S — Replace single line with three panels. Straightforward template work.
  • MoSCoW: Could Have — Output formatting polish. The command works correctly; the output just doesn't match the spec layout.
  • Parent Epic: #397 (dependency link already exists)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Low — CLI output formatting. `agents project link-resource` shows a single success line instead of spec-required Resource Linked, Access, and Indexing panels. - **Milestone**: v3.7.0 - **Story Points**: 2 — S — Replace single line with three panels. Straightforward template work. - **MoSCoW**: Could Have — Output formatting polish. The command works correctly; the output just doesn't match the spec layout. - **Parent Epic**: #397 (dependency link already exists) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3519
No description provided.