Skip to content

Add doctor selection module and CLI for deterministic read-only selection - #12

Draft
binrogithub wants to merge 1 commit into
masterfrom
codex/create-hc_agent-cli-cmd_doctor-module
Draft

Add doctor selection module and CLI for deterministic read-only selection#12
binrogithub wants to merge 1 commit into
masterfrom
codex/create-hc_agent-cli-cmd_doctor-module

Conversation

@binrogithub

Copy link
Copy Markdown
Owner

Motivation

  • Provide a non-mutating "doctor" selection utility that inspects available resources and chooses one deterministically without creating or modifying resources.
  • Allow tooling to consume a stable ctx_patch and human-readable summary to drive downstream automation or dry-run workflows.

Description

  • Add package scaffolding hc_agent and CLI package hc_agent/cli to host the new functionality.
  • Implement hc_agent/doctor.py which performs read-only listings via a list_resources callable and selects a candidate using precedence: explicit input match > resources tagged with a default tag > stable tie-break by (name, id), and returns a DoctorResult with ctx_patch and summary.
  • Implement tag normalization and parsing logic in hc_agent/doctor.py to support tag values expressed as mappings, lists, or strings and to recognize common truthy values for the default tag.
  • Add CLI entry hc_agent/cli/cmd_doctor.py which accepts --resources-file or JSON on stdin, --explicit, and --default-tag, invokes doctor.run_doctor, and emits a JSON object with ctx_patch and summary to stdout.

Testing

  • No automated tests were run for these changes.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant