feat(resource): add resource registry and DAG metadata #162

Closed
opened 2026-02-22 23:39:44 +00:00 by freemo · 2 comments
Owner

Metadata

  • Commit Message: feat(resource): add resource registry and DAG metadata
  • Branch: feature/m2-resource-registry

Definition of Done

The resource registry supports parent/child relationships with DAG constraint validation. CLI commands resource link-child and resource unlink-child manage edges with confirmation prompts. resource tree handles traversal depth and edge cases (cycles, missing nodes).

This issue is complete when:

  • All subtasks below 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 body should be appropriate in size for a commit message and relatively
    complete in describing what was done.
  • 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.

Subtasks

  • Add resource registry relationships for parent/child links and validate DAG constraints.
  • Add CLI support for resource link-child and resource unlink-child with confirmation prompts.
  • Add resource tree traversal depth handling and edge-case validation (cycles, missing nodes).
  • Persist parent/child link metadata and expose in resource show output.
  • Update docs/reference/resource_cli.md with DAG commands and examples.
  • Tests (Behave): Add scenarios for DAG link/unlink, traversal depth, and cycle rejection.
  • Tests (Robot): Add Robot tests for link-child/unlink-child and tree output.
  • Tests (ASV): Add benchmarks/resource_dag_bench.py for traversal performance.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: #### M2: Actor Graphs + Tool Sources (Day 14)
Status: Completed

## Metadata - **Commit Message**: `feat(resource): add resource registry and DAG metadata` - **Branch**: `feature/m2-resource-registry` ## Definition of Done The resource registry supports parent/child relationships with DAG constraint validation. CLI commands `resource link-child` and `resource unlink-child` manage edges with confirmation prompts. `resource tree` handles traversal depth and edge cases (cycles, missing nodes). This issue is complete when: - All subtasks below 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 body should be appropriate in size for a commit message and relatively complete in describing what was done. - 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. ## Subtasks - [x] Add resource registry relationships for parent/child links and validate DAG constraints. - [x] Add CLI support for `resource link-child` and `resource unlink-child` with confirmation prompts. - [x] Add `resource tree` traversal depth handling and edge-case validation (cycles, missing nodes). - [x] Persist parent/child link metadata and expose in `resource show` output. - [x] Update `docs/reference/resource_cli.md` with DAG commands and examples. - [x] Tests (Behave): Add scenarios for DAG link/unlink, traversal depth, and cycle rejection. - [x] Tests (Robot): Add Robot tests for link-child/unlink-child and tree output. - [x] Tests (ASV): Add `benchmarks/resource_dag_bench.py` for traversal performance. - [x] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [x] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: #### M2: Actor Graphs + Tool Sources (Day 14) **Status**: Completed
freemo added this to the v3.1.0 milestone 2026-02-22 23:39:44 +00:00
Author
Owner

Expected completion updated (Day 15 rebaseline): Day 21 / 2026-03-01 (previously Day 18 / 2026-02-26)

**Expected completion updated (Day 15 rebaseline):** Day 21 / 2026-03-01 (previously Day 18 / 2026-02-26)
freemo added the due date 2026-02-24 2026-02-23 18:41:25 +00:00
Author
Owner

All subtasks completed and merged to master via PR #385 (develop-hamza-2). All implementation plan tasks for commit group M2.5.resource-registry verified as complete — including code, docs, Behave/Robot/ASV tests, coverage >=97%, and full nox pass.

All subtasks completed and merged to `master` via PR #385 (`develop-hamza-2`). All implementation plan tasks for commit group **M2.5.resource-registry** verified as complete — including code, docs, Behave/Robot/ASV tests, coverage >=97%, and full nox pass.
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".

2026-02-24

Blocks
Reference
cleveragents/cleveragents-core#162
No description provided.