UAT: agents resource show does not display parent/child relationships, capabilities, or linked projects as spec requires #3613

Open
opened 2026-04-05 20:32:38 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: bugfix/backlog-resource-show-missing-fields
  • Commit Message: fix(cli): display capabilities, DAG relationships, and linked projects in agents resource show
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #398

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

Background and Context

Per docs/specification.md, the agents resource show command is defined as:

"Show detailed information about a registered resource including its type, capabilities, parent/child relationships, and linked projects."

The spec explicitly requires all four data categories: type, capabilities, parent/child relationships, and linked projects.

Actual Behavior

The resource show command currently displays only: Resource ID, Name, Type, Classification, Description, Location, Properties, Created, Updated.

Missing from output:

  1. Capabilities (readable, writable, sandboxable, checkpointable) — not shown
  2. Parent/child relationships (DAG edges) — not shown
  3. Linked projects — not shown

Root Causes

Root Cause 1: _resource_dict() helper is incomplete

# src/cleveragents/cli/commands/resource.py
def _resource_dict(resource: Any) -> dict[str, object]:
    return {
        "resource_id": resource.resource_id,
        "name": resource.name,
        "type": resource.resource_type_name,
        "classification": str(resource.classification),
        "description": resource.description,
        "location": resource.location,
        "properties": resource.properties,
        "created_at": ...,
        "updated_at": ...,
    }
    # Missing: capabilities, parents, children, linked_projects

Root Cause 2: db_resource_to_domain() doesn't populate DAG fields

# src/cleveragents/application/services/_resource_registry_data.py
return Resource(
    resource_id=str(row.resource_id),
    name=ns_name,
    resource_type_name=str(row.type_name),
    classification=PhysVirt(str(row.resource_kind)),
    description=desc,
    properties=props,
    location=loc,
    content_hash=c_hash,
    sandbox_strategy=None,
    created_at=...,
    updated_at=...,
    # Missing: parents, children, linked_projects, capabilities
)

The Resource domain model has parents, children, linked_projects, and capabilities fields, but they are never populated from the database.

Root Cause 3: resource_show() rich output doesn't include these fields

# src/cleveragents/cli/commands/resource.py, resource_show()
details = (
    f"[bold]Resource ID:[/bold] {res.resource_id}\n"
    f"[bold]Name:[/bold] {res.name or '(unnamed)'}\n"
    f"[bold]Type:[/bold] {res.resource_type_name}\n"
    f"[bold]Classification:[/bold] {res.classification}\n"
    f"[bold]Description:[/bold] {res.description or '(none)'}\n"
    f"[bold]Location:[/bold] {res.location or '(none)'}\n"
    f"[bold]Properties:[/bold]\n{props_display}\n"
    f"[bold]Created:[/bold] {res.created_at}\n"
    f"[bold]Updated:[/bold] {res.updated_at}"
    # Missing: Capabilities, Parents, Children, Linked Projects
)

Impact

Users cannot see the DAG relationships (parent/child), capabilities, or project linkages for a resource via agents resource show. This is a significant functional gap since these are core features of the resource model per the specification.

Code Locations

  • src/cleveragents/cli/commands/resource.py_resource_dict() helper and resource_show() function
  • src/cleveragents/application/services/_resource_registry_data.pydb_resource_to_domain() function
  • src/cleveragents/application/services/_resource_registry_ops.pyshow_resource() method (needs to query DAG edges and project links)

Subtasks

  • Write failing BDD scenario in features/ covering agents resource show output for capabilities, parents, children, and linked projects
  • Update db_resource_to_domain() in _resource_registry_data.py to query and populate parents, children, linked_projects, and capabilities fields from the database
  • Update show_resource() in _resource_registry_ops.py to join DAG edge tables and project link tables when fetching a resource for display
  • Update _resource_dict() in resource.py to include capabilities, parents, children, and linked_projects keys
  • Update resource_show() rich output in resource.py to render Capabilities, Parents, Children, and Linked Projects panels/sections
  • Ensure JSON/YAML output (--format json/--format yaml) also includes the new fields
  • Update Robot Framework integration test for agents resource show to assert the new fields are present
  • Run nox to confirm all quality gates pass

Definition of Done

  • agents resource show <ID> displays capabilities (readable, writable, sandboxable, checkpointable)
  • agents resource show <ID> displays parent resources (DAG parents)
  • agents resource show <ID> displays child resources (DAG children)
  • agents resource show <ID> displays linked projects
  • JSON/YAML output includes all four new field groups
  • BDD scenario(s) in features/ cover the new output fields and pass
  • Robot Framework integration test updated and passing
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `bugfix/backlog-resource-show-missing-fields` - **Commit Message**: `fix(cli): display capabilities, DAG relationships, and linked projects in agents resource show` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #398 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.0.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context Per `docs/specification.md`, the `agents resource show` command is defined as: > "Show detailed information about a registered resource including its **type**, **capabilities**, **parent/child relationships**, and **linked projects**." The spec explicitly requires all four data categories: type, capabilities, parent/child relationships, and linked projects. ## Actual Behavior The `resource show` command currently displays only: Resource ID, Name, Type, Classification, Description, Location, Properties, Created, Updated. **Missing from output:** 1. **Capabilities** (`readable`, `writable`, `sandboxable`, `checkpointable`) — not shown 2. **Parent/child relationships** (DAG edges) — not shown 3. **Linked projects** — not shown ## Root Causes ### Root Cause 1: `_resource_dict()` helper is incomplete ```python # src/cleveragents/cli/commands/resource.py def _resource_dict(resource: Any) -> dict[str, object]: return { "resource_id": resource.resource_id, "name": resource.name, "type": resource.resource_type_name, "classification": str(resource.classification), "description": resource.description, "location": resource.location, "properties": resource.properties, "created_at": ..., "updated_at": ..., } # Missing: capabilities, parents, children, linked_projects ``` ### Root Cause 2: `db_resource_to_domain()` doesn't populate DAG fields ```python # src/cleveragents/application/services/_resource_registry_data.py return Resource( resource_id=str(row.resource_id), name=ns_name, resource_type_name=str(row.type_name), classification=PhysVirt(str(row.resource_kind)), description=desc, properties=props, location=loc, content_hash=c_hash, sandbox_strategy=None, created_at=..., updated_at=..., # Missing: parents, children, linked_projects, capabilities ) ``` The `Resource` domain model has `parents`, `children`, `linked_projects`, and `capabilities` fields, but they are never populated from the database. ### Root Cause 3: `resource_show()` rich output doesn't include these fields ```python # src/cleveragents/cli/commands/resource.py, resource_show() details = ( f"[bold]Resource ID:[/bold] {res.resource_id}\n" f"[bold]Name:[/bold] {res.name or '(unnamed)'}\n" f"[bold]Type:[/bold] {res.resource_type_name}\n" f"[bold]Classification:[/bold] {res.classification}\n" f"[bold]Description:[/bold] {res.description or '(none)'}\n" f"[bold]Location:[/bold] {res.location or '(none)'}\n" f"[bold]Properties:[/bold]\n{props_display}\n" f"[bold]Created:[/bold] {res.created_at}\n" f"[bold]Updated:[/bold] {res.updated_at}" # Missing: Capabilities, Parents, Children, Linked Projects ) ``` ## Impact Users cannot see the DAG relationships (parent/child), capabilities, or project linkages for a resource via `agents resource show`. This is a significant functional gap since these are core features of the resource model per the specification. ## Code Locations - `src/cleveragents/cli/commands/resource.py` — `_resource_dict()` helper and `resource_show()` function - `src/cleveragents/application/services/_resource_registry_data.py` — `db_resource_to_domain()` function - `src/cleveragents/application/services/_resource_registry_ops.py` — `show_resource()` method (needs to query DAG edges and project links) ## Subtasks - [ ] Write failing BDD scenario in `features/` covering `agents resource show` output for capabilities, parents, children, and linked projects - [ ] Update `db_resource_to_domain()` in `_resource_registry_data.py` to query and populate `parents`, `children`, `linked_projects`, and `capabilities` fields from the database - [ ] Update `show_resource()` in `_resource_registry_ops.py` to join DAG edge tables and project link tables when fetching a resource for display - [ ] Update `_resource_dict()` in `resource.py` to include `capabilities`, `parents`, `children`, and `linked_projects` keys - [ ] Update `resource_show()` rich output in `resource.py` to render Capabilities, Parents, Children, and Linked Projects panels/sections - [ ] Ensure JSON/YAML output (`--format json`/`--format yaml`) also includes the new fields - [ ] Update Robot Framework integration test for `agents resource show` to assert the new fields are present - [ ] Run `nox` to confirm all quality gates pass ## Definition of Done - [ ] `agents resource show <ID>` displays capabilities (readable, writable, sandboxable, checkpointable) - [ ] `agents resource show <ID>` displays parent resources (DAG parents) - [ ] `agents resource show <ID>` displays child resources (DAG children) - [ ] `agents resource show <ID>` displays linked projects - [ ] JSON/YAML output includes all four new field groups - [ ] BDD scenario(s) in `features/` cover the new output fields and pass - [ ] Robot Framework integration test updated and passing - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:35:18 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low — agents resource show is missing parent/child relationships, capabilities, and other spec-required display sections. CLI output completeness issue.
  • Milestone: v3.7.0
  • Story Points: 3 — M — Requires adding multiple display sections with data from different sources.
  • MoSCoW: Could Have — Output completeness improvement. The show command displays basic resource info; the missing sections are supplementary.

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Low — `agents resource show` is missing parent/child relationships, capabilities, and other spec-required display sections. CLI output completeness issue. - **Milestone**: v3.7.0 - **Story Points**: 3 — M — Requires adding multiple display sections with data from different sources. - **MoSCoW**: Could Have — Output completeness improvement. The show command displays basic resource info; the missing sections are supplementary. --- **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
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3613
No description provided.