feat(skills): umodel-query reads metrics/logs via plan→execute + progressive-disclosure references#51
Open
qiansheng91 wants to merge 2 commits into
Open
feat(skills): umodel-query reads metrics/logs via plan→execute + progressive-disclosure references#51qiansheng91 wants to merge 2 commits into
qiansheng91 wants to merge 2 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes
umodel-querythe complete data-retrieval skill across all read types andrestructures it for progressive disclosure (Agent Skills standard: a lean
SKILL.mdplusreferences/).Headline:
get_metrics/get_logsreturn an executable plan (open source = planprovider). 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 (installumctl, point at the server,umctl workspace list),a surface→guide map, and how
.umodeltypes relate to.entity/.entity_setviadomain+name.references/— one focused guide per query surface, each documenting the returned format + aworked 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)
| where __relation_type__='calls'—with(...)does not filter graph-call output.getNeighborNodesreturns edges in both directions; use__src_entity_id__/__dest_entity_id__to tell upstream from downstream.responseType=1→ plan atdata.data[0][1];=2→ table at[2]/[3].umodel-rcapoints at umodel-query's execute section and aligns its runbook / worked example tothe real pack.
skills/QUICKSTART.md(+.zh-CN): metric/log values run against your ownPrometheus / Elasticsearch.
Verification
claude plugin validatepasses; SKILL↔references and inter-reference links all resolve.captured live from
make quickstart QUICKSTART_SAMPLE=examples/incident-investigation.Skill-only; no engine code change.