Skip to content

feat(skills): umodel-query reads metrics/logs via plan→execute + progressive-disclosure references#51

Open
qiansheng91 wants to merge 2 commits into
mainfrom
codex/skill-execute-plan
Open

feat(skills): umodel-query reads metrics/logs via plan→execute + progressive-disclosure references#51
qiansheng91 wants to merge 2 commits into
mainfrom
codex/skill-execute-plan

Conversation

@qiansheng91

Copy link
Copy Markdown
Collaborator

What

Makes umodel-query the complete data-retrieval skill across all read types and
restructures it for progressive disclosure (Agent Skills standard: a lean SKILL.md plus
references/).

Headline: get_metrics / get_logs return an executable plan (open source = plan
provider). The skill now teaches the agent to read the plan and run it against the backend
(Prometheus / Elasticsearch) with whatever tooling it has — completing entities → relations →
model → metrics/logs end to end. The LLM is the executor; no engine code change, endpoint-agnostic.

Structure (progressive disclosure)

skills/umodel-query/

  • SKILL.md — lean overview: setup (install umctl, point at the server, umctl workspace list),
    a surface→guide map, and how .umodel types relate to .entity / .entity_set via domain+name.
  • references/ — one focused guide per query surface, each documenting the returned format + a
    worked example
    with real demo values:
    • entity.md (.entity), topology.md (.topo), model.md (.umodel),
      entity-set.md (.entity_set | entity-call), metrics-logs.md (get_metrics / get_logs).

Correctness (verified against the incident-investigation pack)

  • topo relation filter is | where __relation_type__='calls'with(...) does not filter graph-call output.
  • getNeighborNodes returns edges in both directions; use __src_entity_id__ / __dest_entity_id__ to tell upstream from downstream.
  • entity-call result shape: responseType=1 → plan at data.data[0][1]; =2 → table at [2]/[3].
  • Real plan fields and example values (PromQL, ES DSL, endpoints, mapped field names).

umodel-rca points at umodel-query's execute section and aligns its runbook / worked example to
the real pack. skills/QUICKSTART.md (+ .zh-CN): metric/log values run against your own
Prometheus / Elasticsearch.

Verification

  • claude plugin validate passes; SKILL↔references and inter-reference links all resolve.
  • Plan shapes, topo filtering, the entity-call result shape, and the worked-example values were
    captured live from make quickstart QUICKSTART_SAMPLE=examples/incident-investigation.

Skill-only; no engine code change.

…essive-disclosure references

Make umodel-query the complete data-retrieval (取数) skill across all read types and
restructure it for progressive disclosure.

- Reads: `.entity` (objects), `.topo` (relationships/topology), `.umodel` (model catalog),
  `.entity_set | entity-call` (methods). `get_metrics`/`get_logs` return an executable plan
  (open source = plan provider); the agent reads the plan and runs it against the backend
  (Prometheus/Elasticsearch) with whatever tooling it has — no UModel code change.
- Progressive disclosure: SKILL.md is a lean overview (setup, workspace discovery via
  `umctl workspace list`, a surface→guide map, and how `.umodel` types relate to
  `.entity`/`.entity_set` via domain+name). Each query surface has a focused guide under
  references/ (entity, topology, model, entity-set, metrics-logs), each documenting the
  returned format + a worked example with real demo values.
- Correctness, verified against the incident-investigation pack: topo relation filter is
  `| where __relation_type__='calls'` (not `with(...)`, which does not filter); getNeighborNodes
  returns both directions (use src/dest); entity-call result shape (responseType 1=plan at
  data.data[0][1], 2=table at [2]/[3]); real plan field names and example values.
- umodel-rca points at umodel-query's execute section and aligns its runbook/worked-example to
  real pack data. skills/QUICKSTART.md (+zh): metric/log values run against your own Prometheus/ES.

Skill-only; no engine code change. Plugin manifest validation passes.
… global .umodel scan

umodel-query pointed agents at .umodel with(kind='metric_set') to find the metric_set/log_set name for get_metrics/get_logs — a global catalog browse unscoped to the entity (and | project name returns null there). The get_metrics/get_logs flow now uses entity-call list_data_set(['metric_set']), which returns the dataset bound to the specific entity. Also states plainly that the agent executes the plan itself rather than forwarding to a separate executor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant